update
This commit is contained in:
2 files changed
+62
-64
No files matched your search
+2
-4
@@ -66,8 +66,7 @@
|
|||||||
},
|
},
|
||||||
"mason-lspconfig.nvim": {
|
"mason-lspconfig.nvim": {
|
||||||
"rev": "1423254f58a3407a5afd5ade0ccd901f3eecc6ba",
|
"rev": "1423254f58a3407a5afd5ade0ccd901f3eecc6ba",
|
||||||
"src": "https://github.com/mason-org/mason-lspconfig.nvim",
|
"src": "https://github.com/mason-org/mason-lspconfig.nvim"
|
||||||
"version": "'main'"
|
|
||||||
},
|
},
|
||||||
"mason-nvim-lint": {
|
"mason-nvim-lint": {
|
||||||
"rev": "cafbc5d82d8eb4af0daf0057332a325ddf2f436b",
|
"rev": "cafbc5d82d8eb4af0daf0057332a325ddf2f436b",
|
||||||
@@ -75,8 +74,7 @@
|
|||||||
},
|
},
|
||||||
"mason.nvim": {
|
"mason.nvim": {
|
||||||
"rev": "cb8445f8ce85d957416c106b780efd51c6298f89",
|
"rev": "cb8445f8ce85d957416c106b780efd51c6298f89",
|
||||||
"src": "https://github.com/mason-org/mason.nvim",
|
"src": "https://github.com/mason-org/mason.nvim"
|
||||||
"version": "'main'"
|
|
||||||
},
|
},
|
||||||
"mdx.nvim": {
|
"mdx.nvim": {
|
||||||
"rev": "6c3dc7c4a4b58b5d86404c21a9b4655282ca08c5",
|
"rev": "6c3dc7c4a4b58b5d86404c21a9b4655282ca08c5",
|
||||||
|
|||||||
+60
-60
@@ -1,74 +1,74 @@
|
|||||||
add({
|
add({
|
||||||
{ src = "mason-org/mason.nvim", version = "main" }, -- lsp installer manager
|
'mason-org/mason.nvim', -- lsp installer manager
|
||||||
{ src = "mason-org/mason-lspconfig.nvim", version = "main" }, -- lsp installer
|
'mason-org/mason-lspconfig.nvim', -- lsp installer
|
||||||
"neovim/nvim-lspconfig", -- lsp config
|
'neovim/nvim-lspconfig', -- lsp config
|
||||||
"nvimdev/Lspsaga.nvim", -- lsp ui
|
'nvimdev/Lspsaga.nvim', -- lsp ui
|
||||||
"rachartier/tiny-inline-diagnostic.nvim", -- inline diagnostic
|
'rachartier/tiny-inline-diagnostic.nvim', -- inline diagnostic
|
||||||
"rachartier/tiny-code-action.nvim", -- code action
|
'rachartier/tiny-code-action.nvim', -- code action
|
||||||
})
|
})
|
||||||
|
|
||||||
-- lsp installer
|
-- lsp installer
|
||||||
require("mason").setup({
|
require('mason').setup({
|
||||||
ui = {
|
ui = {
|
||||||
icons = {
|
icons = {
|
||||||
package_installed = "✓",
|
package_installed = '✓',
|
||||||
package_pending = "➜",
|
package_pending = '➜',
|
||||||
package_uninstalled = "✗",
|
package_uninstalled = '✗',
|
||||||
},
|
},
|
||||||
border = "rounded",
|
border = 'rounded',
|
||||||
backdrop = 100,
|
backdrop = 100,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
require("mason-lspconfig").setup({
|
require('mason-lspconfig').setup({
|
||||||
ensure_installed = require("extensions").lsp_server,
|
ensure_installed = require('extensions').lsp_server,
|
||||||
automatic_installation = false, -- Don't auto-install or auto-configure
|
automatic_installation = false, -- Don't auto-install or auto-configure
|
||||||
})
|
})
|
||||||
|
|
||||||
-- improve neovim lsp experience
|
-- improve neovim lsp experience
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
callback = function()
|
callback = function()
|
||||||
require("lspsaga").setup({
|
require('lspsaga').setup({
|
||||||
ui = {
|
ui = {
|
||||||
theme = "round",
|
theme = 'round',
|
||||||
border = "rounded",
|
border = 'rounded',
|
||||||
devicon = true,
|
devicon = true,
|
||||||
title = true,
|
title = true,
|
||||||
winblend = 1,
|
winblend = 1,
|
||||||
expand = " ",
|
expand = ' ',
|
||||||
collapse = " ",
|
collapse = ' ',
|
||||||
preview = "",
|
preview = '',
|
||||||
code_action = " ",
|
code_action = ' ',
|
||||||
diagnostic = " ",
|
diagnostic = ' ',
|
||||||
incoming = " ",
|
incoming = ' ',
|
||||||
outgoing = " ",
|
outgoing = ' ',
|
||||||
hover = " ",
|
hover = ' ',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
--inline diagnostic
|
--inline diagnostic
|
||||||
require("tiny-inline-diagnostic").setup({
|
require('tiny-inline-diagnostic').setup({
|
||||||
options = {
|
options = {
|
||||||
show_source = true,
|
show_source = true,
|
||||||
multiple_diag_under_cursor = true,
|
multiple_diag_under_cursor = true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
--code action
|
--code action
|
||||||
require("tiny-code-action").setup({
|
require('tiny-code-action').setup({
|
||||||
picker = {
|
picker = {
|
||||||
"buffer",
|
'buffer',
|
||||||
opts = {
|
opts = {
|
||||||
auto_preview = true,
|
auto_preview = true,
|
||||||
hotkeys = true,
|
hotkeys = true,
|
||||||
hotkeys_mode = "sequential",
|
hotkeys_mode = 'sequential',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.diagnostic.config({ virtual_text = false }) -- Disable default virtual text
|
vim.diagnostic.config({ virtual_text = false }) -- Disable default virtual text
|
||||||
vim.keymap.set("n", "<leader>.", function()
|
vim.keymap.set('n', '<leader>.', function()
|
||||||
require("tiny-code-action").code_action()
|
require('tiny-code-action').code_action()
|
||||||
end, { desc = "Code action" })
|
end, { desc = 'Code action' })
|
||||||
Reference in new issue
Block a user