Update configuration for neovim 0.11

This commit is contained in:
Lol3rrr
2026-01-16 20:18:31 +01:00
parent 62dfa1466c
commit 35186f4fc4
5 changed files with 57 additions and 132 deletions

View File

@@ -17,13 +17,13 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup("plugins")
--require("lazy").setup({
-- spec = {
-- { import = "plugins" }
-- }
--})
--require("lazy")
require("lazy").setup({
spec = {
{ import = "plugins" }
},
-- automatically check for plugin updates
checker = { enabled = true },
})
local config_path = vim.fn.stdpath("config")
@@ -39,16 +39,53 @@ vim.o.shiftwidth = 2
vim.keymap.set('t', '<Esc>', [[<C-\><C-n>]])
-- Setup language servers.
local lspconfig = require('lspconfig')
lspconfig.pyright.setup {}
lspconfig.tsserver.setup {}
lspconfig.rust_analyzer.setup {
vim.lsp.enable('pyright')
vim.lsp.enable('tsserver')
vim.lsp.enable('rust_analyzer')
vim.lsp.config('rust_analyzer', {
-- Server-specific settings. See `:help lspconfig-setup`
settings = {
['rust-analyzer'] = {},
},
}
})
-- Setup Treesitter
require'nvim-treesitter'.setup {
-- Directory to install parsers and queries to (prepended to `runtimepath` to have priority)
install_dir = vim.fn.stdpath('data') .. '/site'
}
require'nvim-treesitter'.install {
"bash",
"c",
"diff",
"html",
"hcl",
"javascript",
"jsdoc",
"json",
--"jsonc",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"toml",
"tsx",
"typescript",
"terraform",
"vim",
"vimdoc",
"xml",
"yaml",
"rust",
"toml",
"ron",
"hcl",
"terraform"
}
-- Global mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions