fix: update plugins on nvim
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" },
|
||||
"sonarlint.nvim": { "branch": "main", "commit": "1d78aaefbee589ecb04c4f9043acbbbd63b505bd" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
|
||||
"ui": { "branch": "v3.0", "commit": "cf498b0c3f75cc65ea809cc3f3cd9bbfa937b042" },
|
||||
"volt": { "branch": "main", "commit": "c45d5f48da8e802e608b5c6da471ca4d84276dfb" },
|
||||
|
@@ -20,5 +20,27 @@ M.base46 = {
|
||||
-- lazyload = false
|
||||
-- }
|
||||
--}
|
||||
--
|
||||
M.mason = {
|
||||
pkgs = {
|
||||
"typescript-language-server",
|
||||
"eslint-lsp",
|
||||
"lua-language-server",
|
||||
"html-lsp",
|
||||
"pyright",
|
||||
"mypy",
|
||||
"ruff",
|
||||
"gopls",
|
||||
"goimports",
|
||||
"debugpy",
|
||||
"rust-analyzer",
|
||||
"codelldb",
|
||||
"tailwindcss-language-server",
|
||||
"golangci-lint-langserver",
|
||||
"typescript-language-server",
|
||||
"sonarlint-language-server",
|
||||
"lua-language-server",
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
|
@@ -1,22 +1,22 @@
|
||||
-- load defaults i.e lua_lsp
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
|
||||
local lspconfig = require "lspconfig"
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
-- EXAMPLE
|
||||
local servers = { "html", "cssls" }
|
||||
local nvlsp = require "nvchad.configs.lspconfig"
|
||||
local nvlsp = require("nvchad.configs.lspconfig")
|
||||
|
||||
-- lsps with default config
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
lspconfig[lsp].setup({
|
||||
on_attach = nvlsp.on_attach,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = nvlsp.capabilities,
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
lspconfig.gopls.setup {
|
||||
lspconfig.gopls.setup({
|
||||
on_attach = nvlsp.on_attach,
|
||||
capabilities = nvlsp.capabilities,
|
||||
cmd = { "gopls" },
|
||||
@@ -28,9 +28,9 @@ lspconfig.gopls.setup {
|
||||
unusedparams = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.ts_ls.setup {
|
||||
lspconfig.ts_ls.setup({
|
||||
on_attach = nvlsp.on_attach,
|
||||
capabilities = nvlsp.capabilities,
|
||||
init_options = {
|
||||
@@ -38,23 +38,23 @@ lspconfig.ts_ls.setup {
|
||||
disableSuggestions = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.tailwindcss.setup {
|
||||
lspconfig.tailwindcss.setup({
|
||||
on_attach = nvlsp.on_attach,
|
||||
capabilities = nvlsp.capabilities,
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.pyright.setup {
|
||||
lspconfig.pyright.setup({
|
||||
on_attach = nvlsp.on_attach,
|
||||
capabilities = nvlsp.capabilities,
|
||||
filetypes = { "python" },
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.eslint.setup {
|
||||
lspconfig.eslint.setup({
|
||||
on_attach = nvlsp.on_attach,
|
||||
capabilities = nvlsp.capabilities,
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.golangcilsp = {
|
||||
default_config = {
|
||||
@@ -73,6 +73,31 @@ lspconfig.golangcilsp = {
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.golangci_lint_ls.setup {
|
||||
lspconfig.golangci_lint_ls.setup({
|
||||
filetypes = { "go", "gomod" },
|
||||
}
|
||||
})
|
||||
|
||||
require("sonarlint").setup({
|
||||
server = {
|
||||
cmd = {
|
||||
"sonarlint-language-server",
|
||||
-- Ensure that sonarlint-language-server uses stdio channel
|
||||
"-stdio",
|
||||
"-analyzers",
|
||||
vim.fn.expand("$MASON/share/nvim/mason/share/sonarlint-analyzers/sonargo.jar"),
|
||||
vim.fn.expand("$MASON/share/sonarlint-analyzers/sonarpython.jar"),
|
||||
vim.fn.expand("$MASON/share/sonarlint-analyzers/sonarjs.jar"),
|
||||
},
|
||||
settings = {
|
||||
sonarlint = {
|
||||
test = "test",
|
||||
},
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
"python",
|
||||
"go",
|
||||
"javascript",
|
||||
"typescript",
|
||||
},
|
||||
})
|
||||
|
@@ -1,15 +1,14 @@
|
||||
require "nvchad.mappings"
|
||||
|
||||
require("nvchad.mappings")
|
||||
|
||||
local map = vim.keymap.set
|
||||
|
||||
local M = {}
|
||||
|
||||
map("n", "]g", function ()
|
||||
vim.diagnostic.goto_next()
|
||||
map("n", "]g", function()
|
||||
vim.diagnostic.jump({ count = 1, float = true })
|
||||
end)
|
||||
map("n", "[g", function ()
|
||||
vim.diagnostic.goto_prev()
|
||||
map("n", "[g", function()
|
||||
vim.diagnostic.jump({ count = -1, float = true })
|
||||
end)
|
||||
|
||||
map("n", "<leader>ww", function()
|
||||
|
@@ -2,38 +2,15 @@ return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = "BufWritePre", -- uncomment for format on save
|
||||
opts = require "configs.conform",
|
||||
opts = require("configs.conform"),
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "configs.lspconfig"
|
||||
require("configs.lspconfig")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"typescript-language-server",
|
||||
"eslint-lsp",
|
||||
"lua-language-server",
|
||||
"html-lsp",
|
||||
"pyright",
|
||||
"mypy",
|
||||
"ruff",
|
||||
"gopls",
|
||||
"goimports",
|
||||
"debugpy",
|
||||
"rust-analyzer",
|
||||
"codelldb",
|
||||
"tailwindcss-language-server",
|
||||
"golangci-lint-langserver",
|
||||
"sonarlint-language-server",
|
||||
"lua-language-server",
|
||||
},
|
||||
},
|
||||
},
|
||||
{ "nvim-neotest/nvim-nio" },
|
||||
{
|
||||
"mistricky/codesnap.nvim",
|
||||
@@ -92,7 +69,7 @@ return {
|
||||
"saecki/crates.nvim",
|
||||
ft = { "rust", "toml" },
|
||||
config = function(_, opts)
|
||||
local crates = require "crates"
|
||||
local crates = require("crates")
|
||||
crates.setup(opts)
|
||||
crates.show()
|
||||
end,
|
||||
@@ -103,7 +80,7 @@ return {
|
||||
require("dapui").setup()
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "🐞" })
|
||||
vim.fn.sign_define("DapBreakpointRejected", { text = "🐞" })
|
||||
local dap, dapui = require "dap", require "dapui"
|
||||
local dap, dapui = require("dap"), require("dapui")
|
||||
dap.listeners.before.attach.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
@@ -129,5 +106,10 @@ return {
|
||||
"css",
|
||||
},
|
||||
},
|
||||
{
|
||||
url = "https://gitlab.com/schrieveslaach/sonarlint.nvim",
|
||||
dependencies = "neovim/nvim-lspconfig",
|
||||
ft = { "python", "go", "js", "ts" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user