|
|
|
@ -51,79 +51,80 @@ vim.api.nvim_create_autocmd("VimLeave", { |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return { { |
|
|
|
|
'neovim/nvim-lspconfig', |
|
|
|
|
event = { "BufReadPre", "BufNewFile" }, |
|
|
|
|
dependencies = { |
|
|
|
|
'hrsh7th/nvim-cmp', |
|
|
|
|
'RRethy/vim-illuminate', |
|
|
|
|
'j-hui/fidget.nvim', |
|
|
|
|
}, |
|
|
|
|
config = function() |
|
|
|
|
local lsp = require("lspconfig") |
|
|
|
|
local lspconfig_defaults = lsp.util.default_config |
|
|
|
|
lspconfig_defaults.capabilities = vim.tbl_deep_extend( |
|
|
|
|
'force', |
|
|
|
|
lspconfig_defaults.capabilities, |
|
|
|
|
require('cmp_nvim_lsp').default_capabilities() |
|
|
|
|
) |
|
|
|
|
--local capabilities = require('cmp_nvim_lsp').default_capabilities() |
|
|
|
|
return { |
|
|
|
|
{ |
|
|
|
|
'neovim/nvim-lspconfig', |
|
|
|
|
event = { "BufReadPre", "BufNewFile" }, |
|
|
|
|
dependencies = { |
|
|
|
|
'hrsh7th/nvim-cmp', |
|
|
|
|
'RRethy/vim-illuminate', |
|
|
|
|
'j-hui/fidget.nvim', |
|
|
|
|
}, |
|
|
|
|
config = function() |
|
|
|
|
local lsp = require("lspconfig") |
|
|
|
|
local lspconfig_defaults = lsp.util.default_config |
|
|
|
|
lspconfig_defaults.capabilities = vim.tbl_deep_extend( |
|
|
|
|
'force', |
|
|
|
|
lspconfig_defaults.capabilities, |
|
|
|
|
require('cmp_nvim_lsp').default_capabilities() |
|
|
|
|
) |
|
|
|
|
--local capabilities = require('cmp_nvim_lsp').default_capabilities() |
|
|
|
|
|
|
|
|
|
lsp.lua_ls.setup({ |
|
|
|
|
on_attach = on_attach, |
|
|
|
|
settings = { |
|
|
|
|
Lua = { |
|
|
|
|
diagnostics = { |
|
|
|
|
globals = { 'vim' } |
|
|
|
|
lsp.lua_ls.setup({ |
|
|
|
|
on_attach = on_attach, |
|
|
|
|
settings = { |
|
|
|
|
Lua = { |
|
|
|
|
diagnostics = { |
|
|
|
|
globals = { 'vim' } |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
lsp.clangd.setup { on_attach = on_attach } |
|
|
|
|
lsp.ts_ls.setup { on_attach = on_attach } -- typescript |
|
|
|
|
lsp.hls.setup { on_attach = on_attach } -- haskell |
|
|
|
|
lsp.pyright.setup { on_attach = on_attach, |
|
|
|
|
settings = { |
|
|
|
|
pyright = { |
|
|
|
|
disableOrganizeImports = true, -- Using Ruff |
|
|
|
|
}, |
|
|
|
|
python = { |
|
|
|
|
analysis = { |
|
|
|
|
ignore = { '*' }, -- Using Ruff |
|
|
|
|
lsp.clangd.setup { on_attach = on_attach } |
|
|
|
|
lsp.ts_ls.setup { on_attach = on_attach } -- typescript |
|
|
|
|
lsp.hls.setup { on_attach = on_attach } -- haskell |
|
|
|
|
lsp.pyright.setup { on_attach = on_attach, |
|
|
|
|
settings = { |
|
|
|
|
pyright = { |
|
|
|
|
disableOrganizeImports = true, -- Using Ruff |
|
|
|
|
}, |
|
|
|
|
python = { |
|
|
|
|
analysis = { |
|
|
|
|
ignore = { '*' }, -- Using Ruff |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
lsp.ruff.setup { on_attach = on_attach } |
|
|
|
|
lsp.svelte.setup { on_attach = on_attach } |
|
|
|
|
lsp.marksman.setup { on_attach = on_attach } |
|
|
|
|
lsp.rust_analyzer.setup { on_attach = on_attach, |
|
|
|
|
settings = { |
|
|
|
|
["rust-analyzer"] = { |
|
|
|
|
checkOnSave = true, |
|
|
|
|
check = { |
|
|
|
|
enable = true, |
|
|
|
|
command = "clippy", |
|
|
|
|
features = "all" |
|
|
|
|
} |
|
|
|
|
lsp.ruff.setup { on_attach = on_attach } |
|
|
|
|
lsp.svelte.setup { on_attach = on_attach } |
|
|
|
|
lsp.marksman.setup { on_attach = on_attach } |
|
|
|
|
lsp.rust_analyzer.setup { on_attach = on_attach, |
|
|
|
|
settings = { |
|
|
|
|
["rust-analyzer"] = { |
|
|
|
|
checkOnSave = true, |
|
|
|
|
check = { |
|
|
|
|
enable = true, |
|
|
|
|
command = "clippy", |
|
|
|
|
features = "all" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
lsp.tailwindcss.setup { on_attach = on_attach } |
|
|
|
|
lsp.tailwindcss.setup { on_attach = on_attach } |
|
|
|
|
|
|
|
|
|
lsp.julials.setup { |
|
|
|
|
on_new_config = function(new_config, _) |
|
|
|
|
local julia = vim.fn.expand("~/.julia/environments/nvim-lspconfig/bin/julia") |
|
|
|
|
if lsp.util.path.is_file(julia) then |
|
|
|
|
vim.notify("running julials") |
|
|
|
|
new_config.cmd[1] = julia |
|
|
|
|
end |
|
|
|
|
end, |
|
|
|
|
on_attach = on_attach |
|
|
|
|
} |
|
|
|
|
end, |
|
|
|
|
}, |
|
|
|
|
lsp.julials.setup { |
|
|
|
|
on_new_config = function(new_config, _) |
|
|
|
|
local julia = vim.fn.expand("~/.julia/environments/nvim-lspconfig/bin/julia") |
|
|
|
|
if lsp.util.path.is_file(julia) then |
|
|
|
|
vim.notify("running julials") |
|
|
|
|
new_config.cmd[1] = julia |
|
|
|
|
end |
|
|
|
|
end, |
|
|
|
|
on_attach = on_attach |
|
|
|
|
} |
|
|
|
|
end, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
'nvimtools/none-ls.nvim', |
|
|
|
|
|
|
|
|
@ -161,6 +162,7 @@ return { { |
|
|
|
|
dependencies = { "nvim-lua/plenary.nvim", |
|
|
|
|
"nvimtools/none-ls-extras.nvim", |
|
|
|
|
'hrsh7th/nvim-cmp', |
|
|
|
|
"L3MON4D3/LuaSnip", |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|