aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/nvim/lua/keybinds.lua54
-rw-r--r--.config/nvim/lua/lsp.lua2
-rw-r--r--.config/nvim/lua/plugins.lua8
3 files changed, 37 insertions, 27 deletions
diff --git a/.config/nvim/lua/keybinds.lua b/.config/nvim/lua/keybinds.lua
index 6094a61..3b7a1ca 100644
--- a/.config/nvim/lua/keybinds.lua
+++ b/.config/nvim/lua/keybinds.lua
@@ -4,6 +4,7 @@ local ufo = require("ufo")
local nt_api = require("nvim-tree.api")
local spider = require("spider")
local toggle_plain = require("utils").toggle_plain;
+local trouble = require("trouble")
vim.g.mapleader = " "
@@ -37,7 +38,8 @@ vim.keymap.set("n", "<Leader>U", vim.cmd.UndotreeToggle)
vim.keymap.set("n", "<Leader>m", ":MinimapToggle<CR>")
vim.keymap.set("n", "<Leader>b", ":Gitsigns blame_line<CR>")
vim.keymap.set("n", "<Leader>h", ":Gitsigns preview_hunk<CR>")
-vim.keymap.set("n", "<Leader>,", ":TroubleToggle<CR>")
+vim.keymap.set("n", "<Leader>,", function() trouble.toggle("diagnostics") end)
+-- ":Trouble diagnostics toggle focus=false filter.buf=0<CR>")
vim.keymap.set("n", "<Leader>t", ":belowright split | resize 5 | terminal<CR>")
vim.keymap.set("n", "<Leader>[", ufo.openAllFolds)
@@ -65,29 +67,29 @@ vim.keymap.set({ "t" }, "<ESC>", "<C-\\><C-n>")
vim.opt.whichwrap = "<,>,h,l,[,]"
wk.add({
- { "<leader>,", desc = "Show errors" },
- { "<leader><CR>", desc = "Quick Action" },
- { "<leader><TAB>", desc = "Show buffers" },
- { "<leader>D", desc = "Definition" },
- { "<leader>F", desc = "Format" },
- { "<leader>J", desc = "Signature help" },
- { "<leader>K", desc = "Hover" },
- { "<leader>L", desc = "Toggle plain mode" },
- { "<leader>N", desc = "Next tab" },
- { "<leader>P", desc = "Previous tab" },
- { "<leader>R", desc = "Show References" },
- { "<leader>S", desc = "Symbols" },
- { "<leader>U", desc = "Undo tree" },
- { "<leader>[", desc = "Open folds" },
- { "<leader>]", desc = "Close folds" },
- { "<leader>b", desc = "Blame line" },
- { "<leader>d", desc = "Show diagnostics" },
- { "<leader>f", desc = "Find files" },
- { "<leader>h", desc = "Preview hunk" },
- { "<leader>m", desc = "Toggle Minimap" },
- { "<leader>n", desc = "Show file tree" },
- { "<leader>q", desc = "Quit" },
- { "<leader>r", desc = "Rename" },
- { "<leader>s", desc = "Save file" },
- { "<leader>t", desc = "Open terminal" },
+ { "<leader>,"; desc = "Show errors" };
+ { "<leader><CR>"; desc = "Quick Action" };
+ { "<leader><TAB>"; desc = "Show buffers" };
+ { "<leader>D"; desc = "Definition" };
+ { "<leader>F"; desc = "Format" };
+ { "<leader>J"; desc = "Signature help" };
+ { "<leader>K"; desc = "Hover" };
+ { "<leader>L"; desc = "Toggle plain mode" };
+ { "<leader>N"; desc = "Next tab" };
+ { "<leader>P"; desc = "Previous tab" };
+ { "<leader>R"; desc = "Show References" };
+ { "<leader>S"; desc = "Symbols" };
+ { "<leader>U"; desc = "Undo tree" };
+ { "<leader>["; desc = "Open folds" };
+ { "<leader>]"; desc = "Close folds" };
+ { "<leader>b"; desc = "Blame line" };
+ { "<leader>d"; desc = "Show diagnostics" };
+ { "<leader>f"; desc = "Find files" };
+ { "<leader>h"; desc = "Preview hunk" };
+ { "<leader>m"; desc = "Toggle Minimap" };
+ { "<leader>n"; desc = "Show file tree" };
+ { "<leader>q"; desc = "Quit" };
+ { "<leader>r"; desc = "Rename" };
+ { "<leader>s"; desc = "Save file" };
+ { "<leader>t"; desc = "Open terminal" };
}, { prefix = "<leader>" });
diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua
index d43a931..4d7a28e 100644
--- a/.config/nvim/lua/lsp.lua
+++ b/.config/nvim/lua/lsp.lua
@@ -115,7 +115,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
local lsputils = lspconfig.util
-lspconfig.tsserver.setup({
+lspconfig.ts_ls.setup({
on_attach = function(client, bufnr)
client.server_capabilities.documentFormattingProvider = false
on_attach(client, bufnr)
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
index 11b0b3d..1b502eb 100644
--- a/.config/nvim/lua/plugins.lua
+++ b/.config/nvim/lua/plugins.lua
@@ -114,6 +114,7 @@ local function init_plugins()
local telescopeConfig = require("telescope.config")
local previewers = require("telescope.previewers")
local lsp_lens = require("lsp-lens")
+ local trouble = require("trouble")
local _bad = { ".*%.cshtml" }
local bad_files = function(filepath)
@@ -439,6 +440,13 @@ local function init_plugins()
SymbolKind.Interface;
};
})
+
+ trouble.setup({
+ use_lsp_diagnostic_signs = true;
+ indent_lines = true;
+ warn_no_results = false;
+ open_no_results = true;
+ })
end
local function clone_paq()