update lsp setup for rust, toml and trouble plugin
This commit is contained in:
parent
ca6a15812d
commit
6a7b800f8c
4 changed files with 19 additions and 8 deletions
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"diagnostics.globals": [
|
|
||||||
"enabled_plugins"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -28,6 +28,7 @@ return {
|
||||||
python = { "ruff_format", "ruff_organize_imports" },
|
python = { "ruff_format", "ruff_organize_imports" },
|
||||||
scss = { "prettierd", "prettier", stop_after_first = true },
|
scss = { "prettierd", "prettier", stop_after_first = true },
|
||||||
sh = { "shfmt" },
|
sh = { "shfmt" },
|
||||||
|
toml = { "taplo" },
|
||||||
typescript = { "biome" },
|
typescript = { "biome" },
|
||||||
typescriptreact = { "biome" },
|
typescriptreact = { "biome" },
|
||||||
xml = { "lemminx" },
|
xml = { "lemminx" },
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@ return {
|
||||||
"blade"
|
"blade"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
harper_ls = {},
|
||||||
html = {},
|
html = {},
|
||||||
marksman = {},
|
marksman = {},
|
||||||
phpactor = {},
|
phpactor = {},
|
||||||
|
|
@ -134,6 +135,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sqlls = {},
|
sqlls = {},
|
||||||
|
taplo = {},
|
||||||
yamlls = {
|
yamlls = {
|
||||||
settings = {
|
settings = {
|
||||||
yaml = {
|
yaml = {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
---@module 'trouble'
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
|
@ -40,7 +42,7 @@ return {
|
||||||
|
|
||||||
---@type trouble.Config
|
---@type trouble.Config
|
||||||
return {
|
return {
|
||||||
focus = false,
|
focus = true,
|
||||||
|
|
||||||
---@type trouble.Window.opts
|
---@type trouble.Window.opts
|
||||||
preview = {
|
preview = {
|
||||||
|
|
@ -51,13 +53,24 @@ return {
|
||||||
|
|
||||||
---@type table<string, trouble.Action.spec|false>
|
---@type table<string, trouble.Action.spec|false>
|
||||||
keys = {
|
keys = {
|
||||||
["<cr>"] = "jump_close",
|
["<s-cr>"] = "jump_close",
|
||||||
["<2-leftmouse>"] = "jump_close",
|
["<cr>"] = "jump",
|
||||||
|
["<2-leftmouse>"] = "jump",
|
||||||
["<c-v>"] = "jump_split_close",
|
["<c-v>"] = "jump_split_close",
|
||||||
["<c-s>"] = "jump_vsplit_close",
|
["<c-s>"] = "jump_vsplit_close",
|
||||||
["v"] = "jump_split_close",
|
["v"] = "jump_split_close",
|
||||||
["s"] = "jump_vsplit_close",
|
["s"] = "jump_vsplit_close",
|
||||||
["<c-k>"] = "cancel", -- hack to fool myself into thinking I move to the avobe window
|
["<c-k>"] = "cancel", -- hack to fool myself into thinking I move to the avobe window
|
||||||
|
["a"] = function(view, ctx)
|
||||||
|
-- TODO: this is not possible until this issue is solved
|
||||||
|
-- https://github.com/neovim/neovim/issues/31206
|
||||||
|
local trouble = require("trouble")
|
||||||
|
view:action("jump_only")
|
||||||
|
|
||||||
|
vim.lsp.buf.code_action()
|
||||||
|
|
||||||
|
trouble.focus(view, ctx)
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
win = win_opts,
|
win = win_opts,
|
||||||
---@type table<string, trouble.Mode>
|
---@type table<string, trouble.Mode>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue