fix: update plugins on nvim
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
|
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
|
||||||
"rustaceanvim": { "branch": "master", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" },
|
"rustaceanvim": { "branch": "master", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" },
|
||||||
|
"sonarlint.nvim": { "branch": "main", "commit": "1d78aaefbee589ecb04c4f9043acbbbd63b505bd" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
|
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
|
||||||
"ui": { "branch": "v3.0", "commit": "cf498b0c3f75cc65ea809cc3f3cd9bbfa937b042" },
|
"ui": { "branch": "v3.0", "commit": "cf498b0c3f75cc65ea809cc3f3cd9bbfa937b042" },
|
||||||
"volt": { "branch": "main", "commit": "c45d5f48da8e802e608b5c6da471ca4d84276dfb" },
|
"volt": { "branch": "main", "commit": "c45d5f48da8e802e608b5c6da471ca4d84276dfb" },
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
-- This file needs to have same structure as nvconfig.lua
|
-- This file needs to have same structure as nvconfig.lua
|
||||||
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
|
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
|
||||||
-- Please read that file to know all available options :(
|
-- Please read that file to know all available options :(
|
||||||
|
|
||||||
---@type ChadrcConfig
|
---@type ChadrcConfig
|
||||||
local M = {}
|
local M = {}
|
||||||
@@ -20,5 +20,27 @@ M.base46 = {
|
|||||||
-- lazyload = false
|
-- 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
|
return M
|
||||||
|
@@ -1,78 +1,103 @@
|
|||||||
-- load defaults i.e lua_lsp
|
-- load defaults i.e lua_lsp
|
||||||
require("nvchad.configs.lspconfig").defaults()
|
require("nvchad.configs.lspconfig").defaults()
|
||||||
|
|
||||||
local lspconfig = require "lspconfig"
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
-- EXAMPLE
|
-- EXAMPLE
|
||||||
local servers = { "html", "cssls" }
|
local servers = { "html", "cssls" }
|
||||||
local nvlsp = require "nvchad.configs.lspconfig"
|
local nvlsp = require("nvchad.configs.lspconfig")
|
||||||
|
|
||||||
-- lsps with default config
|
-- lsps with default config
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup {
|
lspconfig[lsp].setup({
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
on_init = nvlsp.on_init,
|
on_init = nvlsp.on_init,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
lspconfig.gopls.setup {
|
lspconfig.gopls.setup({
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
cmd = { "gopls" },
|
cmd = { "gopls" },
|
||||||
filetypes = { "go", "gomod", "gowork", "gotmpl" },
|
filetypes = { "go", "gomod", "gowork", "gotmpl" },
|
||||||
settings = {
|
settings = {
|
||||||
completeUnimported = true,
|
completeUnimported = true,
|
||||||
usePlaceholders = true,
|
usePlaceholders = true,
|
||||||
analyses = {
|
analyses = {
|
||||||
unusedparams = true,
|
unusedparams = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
})
|
||||||
|
|
||||||
lspconfig.ts_ls.setup {
|
lspconfig.ts_ls.setup({
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
init_options = {
|
init_options = {
|
||||||
preferences = {
|
preferences = {
|
||||||
disableSuggestions = true,
|
disableSuggestions = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
})
|
||||||
|
|
||||||
lspconfig.tailwindcss.setup {
|
lspconfig.tailwindcss.setup({
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
}
|
})
|
||||||
|
|
||||||
lspconfig.pyright.setup {
|
lspconfig.pyright.setup({
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
filetypes = { "python" },
|
filetypes = { "python" },
|
||||||
}
|
})
|
||||||
|
|
||||||
lspconfig.eslint.setup {
|
lspconfig.eslint.setup({
|
||||||
on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
}
|
})
|
||||||
|
|
||||||
lspconfig.golangcilsp = {
|
lspconfig.golangcilsp = {
|
||||||
default_config = {
|
default_config = {
|
||||||
cmd = { "golangci-lint-langserver" },
|
cmd = { "golangci-lint-langserver" },
|
||||||
root_dir = lspconfig.util.root_pattern(".git", "go.mod"),
|
root_dir = lspconfig.util.root_pattern(".git", "go.mod"),
|
||||||
init_options = {
|
init_options = {
|
||||||
command = {
|
command = {
|
||||||
"golangci-lint",
|
"golangci-lint",
|
||||||
"run",
|
"run",
|
||||||
"--output.json.path",
|
"--output.json.path",
|
||||||
"stdout",
|
"stdout",
|
||||||
"--show-stats=false",
|
"--show-stats=false",
|
||||||
"--issues-exit-code=1",
|
"--issues-exit-code=1",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
lspconfig.golangci_lint_ls.setup {
|
lspconfig.golangci_lint_ls.setup({
|
||||||
filetypes = { "go", "gomod" },
|
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,17 +1,16 @@
|
|||||||
require "nvchad.mappings"
|
require("nvchad.mappings")
|
||||||
|
|
||||||
|
|
||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
map("n", "]g", function ()
|
map("n", "]g", function()
|
||||||
vim.diagnostic.goto_next()
|
vim.diagnostic.jump({ count = 1, float = true })
|
||||||
end)
|
end)
|
||||||
map("n", "[g", function ()
|
map("n", "[g", function()
|
||||||
vim.diagnostic.goto_prev()
|
vim.diagnostic.jump({ count = -1, float = true })
|
||||||
end)
|
end)
|
||||||
|
|
||||||
map("n", "<leader>ww", function()
|
map("n", "<leader>ww", function()
|
||||||
vim.diagnostic.open_float()
|
vim.diagnostic.open_float()
|
||||||
end)
|
end)
|
||||||
|
@@ -1,133 +1,115 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
event = "BufWritePre", -- uncomment for format on save
|
event = "BufWritePre", -- uncomment for format on save
|
||||||
opts = require "configs.conform",
|
opts = require("configs.conform"),
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
config = function()
|
config = function()
|
||||||
require "configs.lspconfig"
|
require("configs.lspconfig")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{ "nvim-neotest/nvim-nio" },
|
||||||
"williamboman/mason.nvim",
|
{
|
||||||
opts = {
|
"mistricky/codesnap.nvim",
|
||||||
ensure_installed = {
|
build = "make build_generator",
|
||||||
"typescript-language-server",
|
keys = {
|
||||||
"eslint-lsp",
|
{ "<leader>cc", "<cmd>CodeSnap<cr>", mode = "x", desc = "Save selected code snapshot into clipboard" },
|
||||||
"lua-language-server",
|
{ "<leader>cs", "<cmd>CodeSnapSave<cr>", mode = "x", desc = "Save selected code snapshot in ~/Pictures" },
|
||||||
"html-lsp",
|
},
|
||||||
"pyright",
|
opts = {
|
||||||
"mypy",
|
save_path = "~/Pictures",
|
||||||
"ruff",
|
has_breadcrumbs = false,
|
||||||
"gopls",
|
bg_theme = "bamboo",
|
||||||
"goimports",
|
watermark = "",
|
||||||
"debugpy",
|
mac_window_bar = false,
|
||||||
"rust-analyzer",
|
},
|
||||||
"codelldb",
|
},
|
||||||
"tailwindcss-language-server",
|
{
|
||||||
"golangci-lint-langserver",
|
"mfussenegger/nvim-dap",
|
||||||
"sonarlint-language-server",
|
},
|
||||||
"lua-language-server",
|
{
|
||||||
},
|
"leoluz/nvim-dap-go",
|
||||||
},
|
ft = "go",
|
||||||
},
|
dependencies = "mfussenegger/nvim-dap",
|
||||||
{ "nvim-neotest/nvim-nio" },
|
config = function(_, opts)
|
||||||
{
|
require("dap-go").setup(opts)
|
||||||
"mistricky/codesnap.nvim",
|
-- require("core.utils").load_mappings("dap_go")
|
||||||
build = "make build_generator",
|
require("dap.ext.vscode").load_launchjs(nil, {})
|
||||||
keys = {
|
end,
|
||||||
{ "<leader>cc", "<cmd>CodeSnap<cr>", mode = "x", desc = "Save selected code snapshot into clipboard" },
|
},
|
||||||
{ "<leader>cs", "<cmd>CodeSnapSave<cr>", mode = "x", desc = "Save selected code snapshot in ~/Pictures" },
|
{
|
||||||
},
|
"mfussenegger/nvim-dap-python",
|
||||||
opts = {
|
ft = "python",
|
||||||
save_path = "~/Pictures",
|
dependencies = "mfussenegger/nvim-dap",
|
||||||
has_breadcrumbs = false,
|
config = function(_, _)
|
||||||
bg_theme = "bamboo",
|
local path = "~/.local/share/nvim/mason/packages/debugpy/venv/bin/python"
|
||||||
watermark = "",
|
require("dap-python").setup(path)
|
||||||
mac_window_bar = false,
|
end,
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
{
|
"NVChad/nvim-autopairs",
|
||||||
"mfussenegger/nvim-dap",
|
enabled = false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"leoluz/nvim-dap-go",
|
"mrcjkb/rustaceanvim",
|
||||||
ft = "go",
|
version = "^5", -- Recommended
|
||||||
dependencies = "mfussenegger/nvim-dap",
|
lazy = false, -- This plugin is already lazy
|
||||||
config = function(_, opts)
|
},
|
||||||
require("dap-go").setup(opts)
|
{
|
||||||
-- require("core.utils").load_mappings("dap_go")
|
"rust-lang/rust.vim",
|
||||||
require("dap.ext.vscode").load_launchjs(nil, {})
|
ft = "rust",
|
||||||
end,
|
init = function()
|
||||||
},
|
vim.g.rustfmt_autosave = 1
|
||||||
{
|
end,
|
||||||
"mfussenegger/nvim-dap-python",
|
},
|
||||||
ft = "python",
|
{
|
||||||
dependencies = "mfussenegger/nvim-dap",
|
"saecki/crates.nvim",
|
||||||
config = function(_, _)
|
ft = { "rust", "toml" },
|
||||||
local path = "~/.local/share/nvim/mason/packages/debugpy/venv/bin/python"
|
config = function(_, opts)
|
||||||
require("dap-python").setup(path)
|
local crates = require("crates")
|
||||||
end,
|
crates.setup(opts)
|
||||||
},
|
crates.show()
|
||||||
{
|
end,
|
||||||
"NVChad/nvim-autopairs",
|
},
|
||||||
enabled = false,
|
{
|
||||||
},
|
"rcarriga/nvim-dap-ui",
|
||||||
{
|
init = function()
|
||||||
"mrcjkb/rustaceanvim",
|
require("dapui").setup()
|
||||||
version = "^5", -- Recommended
|
vim.fn.sign_define("DapBreakpoint", { text = "🐞" })
|
||||||
lazy = false, -- This plugin is already lazy
|
vim.fn.sign_define("DapBreakpointRejected", { text = "🐞" })
|
||||||
},
|
local dap, dapui = require("dap"), require("dapui")
|
||||||
{
|
dap.listeners.before.attach.dapui_config = function()
|
||||||
"rust-lang/rust.vim",
|
dapui.open()
|
||||||
ft = "rust",
|
end
|
||||||
init = function()
|
dap.listeners.before.launch.dapui_config = function()
|
||||||
vim.g.rustfmt_autosave = 1
|
dapui.open()
|
||||||
end,
|
end
|
||||||
},
|
dap.listeners.before.event_terminated.dapui_config = function()
|
||||||
{
|
dapui.close()
|
||||||
"saecki/crates.nvim",
|
end
|
||||||
ft = { "rust", "toml" },
|
dap.listeners.before.event_exited.dapui_config = function()
|
||||||
config = function(_, opts)
|
dapui.close()
|
||||||
local crates = require "crates"
|
end
|
||||||
crates.setup(opts)
|
end,
|
||||||
crates.show()
|
},
|
||||||
end,
|
{
|
||||||
},
|
"nvim-treesitter/nvim-treesitter",
|
||||||
{
|
opts = {
|
||||||
"rcarriga/nvim-dap-ui",
|
ensure_installed = {
|
||||||
init = function()
|
"vim",
|
||||||
require("dapui").setup()
|
"lua",
|
||||||
vim.fn.sign_define("DapBreakpoint", { text = "🐞" })
|
"vimdoc",
|
||||||
vim.fn.sign_define("DapBreakpointRejected", { text = "🐞" })
|
"html",
|
||||||
local dap, dapui = require "dap", require "dapui"
|
"css",
|
||||||
dap.listeners.before.attach.dapui_config = function()
|
},
|
||||||
dapui.open()
|
},
|
||||||
end
|
{
|
||||||
dap.listeners.before.launch.dapui_config = function()
|
url = "https://gitlab.com/schrieveslaach/sonarlint.nvim",
|
||||||
dapui.open()
|
dependencies = "neovim/nvim-lspconfig",
|
||||||
end
|
ft = { "python", "go", "js", "ts" },
|
||||||
dap.listeners.before.event_terminated.dapui_config = function()
|
},
|
||||||
dapui.close()
|
},
|
||||||
end
|
|
||||||
dap.listeners.before.event_exited.dapui_config = function()
|
|
||||||
dapui.close()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
opts = {
|
|
||||||
ensure_installed = {
|
|
||||||
"vim",
|
|
||||||
"lua",
|
|
||||||
"vimdoc",
|
|
||||||
"html",
|
|
||||||
"css",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user