-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua.txt
49 lines (47 loc) · 1.37 KB
/
init.lua.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
- Diagnostics
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Go to previous [d]iagnostics message" })
vim.keymap.set("n", "]d", vim.diagnostic.goto_prev, { desc = "Go to next [d]iagnostics message" })
"neovim/nvim-lspconfig",
{
"nvim-telescope/telescope.nvim",
tag = "0.1.6",
branch = "0.1.x",
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local telescope = require("telescope")
local actions = require("telescope.actions")
telescope.setup({
defaults = {
mappings = {
i = {
["<C-d>"] = actions.select_vertical
}
}
}
})
end
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
}
},
{
"sbdchd/neoformat"
}
})
-- remove trailing spaces
vim.api.nvim_create_autocmd("BufWritePre", {
callback = function ()
-- Save cursor position to restore later
local curpos = vim.api.nvim_win_get_cursor(0)
-- Search and replace trailing whitespaces
vim.cmd([[keeppatterns %s/\s\+$//e]])
vim.api.nvim_win_set_cursor(0, curpos)
end
})