nvim: Add nim lsp and formatting
This commit is contained in:
parent
3d0a706c0c
commit
9cc3495c31
2 changed files with 5 additions and 1 deletions
nvim/.config/nvim/lua/plugins
|
@ -13,6 +13,7 @@ local formatters = {
|
|||
liquid = { "prettier" },
|
||||
lua = { "stylua" },
|
||||
markdown = { "prettier", "injected" },
|
||||
nim = { "nimpretty" },
|
||||
python = { "ruff_fix", "ruff_format", "ruff_organize_imports" },
|
||||
quarto = { "prettier", "injected" },
|
||||
sh = { "shfmt" },
|
||||
|
|
|
@ -29,6 +29,7 @@ local servers = {
|
|||
},
|
||||
},
|
||||
marksman = {},
|
||||
nim_langserver = {},
|
||||
basedpyright = {},
|
||||
ruff = {},
|
||||
serve_d = {},
|
||||
|
@ -287,6 +288,7 @@ return {
|
|||
|
||||
local python_path
|
||||
-- ensure python virtualenv is determined automatically on lsp start
|
||||
-- we primarily use pyright for cmp lsp completion & hover info
|
||||
lspconfig.basedpyright.setup({
|
||||
on_attach = function(client, bufnr)
|
||||
on_attach(client, bufnr)
|
||||
|
@ -299,12 +301,13 @@ return {
|
|||
client.config.settings.python.pythonPath = python_path
|
||||
end,
|
||||
settings = {
|
||||
-- disable imports and linting since, we use ruff for that
|
||||
-- disable imports and linting since, using ruff for it
|
||||
pyright = {
|
||||
disableOrganizeImports = true,
|
||||
},
|
||||
python = {
|
||||
analysis = {
|
||||
-- ignore all files, use ruff for linting
|
||||
ignore = { "*" },
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue