From 7dd916afbc9bb98f86860a9076e1bfaa67e62192 Mon Sep 17 00:00:00 2001 From: Christian Nieves Date: Fri, 23 Jun 2023 16:28:50 -0500 Subject: [PATCH] move trouble --- config/.config/nvim/lazy-lock.json | 5 +++-- vim/.vim/lua/config/lsp.lua | 1 - vim/.vim/lua/config/trouble.lua | 32 --------------------------- vim/.vim/lua/plugins/base.lua | 23 -------------------- vim/.vim/lua/plugins/lsp_lines.lua | 19 ++++++++++++++++ vim/.vim/lua/plugins/trouble.lua | 35 ++++++++++++++++++++++++++++++ 6 files changed, 57 insertions(+), 58 deletions(-) delete mode 100644 vim/.vim/lua/config/trouble.lua create mode 100644 vim/.vim/lua/plugins/lsp_lines.lua create mode 100644 vim/.vim/lua/plugins/trouble.lua diff --git a/config/.config/nvim/lazy-lock.json b/config/.config/nvim/lazy-lock.json index 0c607ce..f1e03da 100644 --- a/config/.config/nvim/lazy-lock.json +++ b/config/.config/nvim/lazy-lock.json @@ -1,7 +1,7 @@ { "ai.nvim": { "branch": "main", "commit": "d7391d4782b90ad3501f6f716f2b308092981787" }, "asyncrun.vim": { "branch": "master", "commit": "7191d0c30dd105e5d7f897b9a6ee19cabe734466" }, - "auto-session": { "branch": "main", "commit": "21033c6815f249a7839c3a85fc8a6b44d74925c9" }, + "auto-session": { "branch": "main", "commit": "7afbb149f87be279778689596c781882014f7eef" }, "calendar-vim": { "branch": "master", "commit": "a7e73e02c92566bf427b2a1d6a61a8f23542cc21" }, "catppuccin": { "branch": "main", "commit": "506a4aa13443e0104ea49b99947cc09488d0791d" }, "ciderlsp_nvim": { "branch": "main", "commit": "7007e1881eb421a4d6f7ef1f31e973f7cc0b4d8d" }, @@ -33,9 +33,10 @@ "kotlin-vim": { "branch": "master", "commit": "53fe045906df8eeb07cb77b078fc93acda6c90b8" }, "lazy.nvim": { "branch": "main", "commit": "b7043f2983d7aead78ca902f3f2053907081859a" }, "libp.nvim": { "branch": "main", "commit": "636b1748e92f66022c1763f32b2ded6b8606eda5" }, + "lsp-lens.nvim": { "branch": "main", "commit": "450736ecde76e4e127a7724ec8f6e260870863f8" }, "lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" }, "lsp-zero.nvim": { "branch": "v2.x", "commit": "52582fc91efb40ee347c20570ff7d32849ef4a89" }, - "lsp_lines.nvim": { "branch": "main", "commit": "3b57922d2d79762e6baedaf9d66d8ba71f822816" }, + "lsp_lines.nvim": { "branch": "main", "commit": "f53af96d4789eef39a082dbcce078d2bfc384ece" }, "lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, diff --git a/vim/.vim/lua/config/lsp.lua b/vim/.vim/lua/config/lsp.lua index d464009..3dc86bd 100644 --- a/vim/.vim/lua/config/lsp.lua +++ b/vim/.vim/lua/config/lsp.lua @@ -332,7 +332,6 @@ cmp.setup({ }, experimental = { - native_menu = false, ghost_text = true, }, }) diff --git a/vim/.vim/lua/config/trouble.lua b/vim/.vim/lua/config/trouble.lua deleted file mode 100644 index cc47d12..0000000 --- a/vim/.vim/lua/config/trouble.lua +++ /dev/null @@ -1,32 +0,0 @@ -vim.diagnostic.config({ - virtual_lines = true, - virtual_text = true, - severity_sort = true, - update_in_insert = true, -}) - --- Diagnostics -require("trouble").setup({ - signs = { - -- icons / text used for a diagnostic - error = " ", - warning = " ", - hint = " ", - information = " ", - other = "?﫠", - }, - use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client -}) - --- Mappings -local opts = { noremap = true, silent = true } -vim.api.nvim_set_keymap("n", "gr", "Trouble lsp_references", opts) -vim.api.nvim_set_keymap("n", "xx", "Trouble", opts) -vim.api.nvim_set_keymap("n", "xw", "Trouble workspace_diagnostics", opts) -vim.api.nvim_set_keymap("n", "xd", "Trouble document_diagnostics", opts) -vim.api.nvim_set_keymap("n", "xl", "Trouble loclist", opts) -vim.api.nvim_set_keymap("n", "xq", "Trouble quickfix", opts) -vim.api.nvim_set_keymap("n", "[g", "lua vim.diagnostic.goto_prev()", opts) -vim.api.nvim_set_keymap("n", "]g", "lua vim.diagnostic.goto_next()", opts) - -vim.cmd([[autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]) diff --git a/vim/.vim/lua/plugins/base.lua b/vim/.vim/lua/plugins/base.lua index 94544f0..588a271 100644 --- a/vim/.vim/lua/plugins/base.lua +++ b/vim/.vim/lua/plugins/base.lua @@ -88,7 +88,6 @@ return { { "hrsh7th/nvim-cmp", event = "VimEnter", - dependencies = { "onsails/lspkind.nvim", "neovim/nvim-lspconfig", @@ -114,19 +113,6 @@ return { event = "InsertEnter", cond = not use_google(), }, - { - "ErichDonGubler/lsp_lines.nvim", - event = "VimEnter", - keys = { - { - "l", - function() - require("lsp_lines").toggle() - end, - desc = "Toggle LSP Lines", - }, - }, - }, { "jose-elias-alvarez/null-ls.nvim", event = "VimEnter", @@ -134,7 +120,6 @@ return { require("config.null-ls") end, }, - -- Rust { "saecki/crates.nvim", @@ -148,14 +133,6 @@ return { { "simrat39/rust-tools.nvim", ft = "rust" }, - { - "folke/trouble.nvim", - event = "VimEnter", - config = function() - require("config.trouble") - end, - }, - { "ThePrimeagen/refactoring.nvim", dependencies = { diff --git a/vim/.vim/lua/plugins/lsp_lines.lua b/vim/.vim/lua/plugins/lsp_lines.lua new file mode 100644 index 0000000..28c619f --- /dev/null +++ b/vim/.vim/lua/plugins/lsp_lines.lua @@ -0,0 +1,19 @@ +return { + url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim", + name = "lsp_lines.nvim", + -- "ErichDonGubler/lsp_lines.nvim", + lazy = false, + config = function() + require("lsp_lines").setup() + end, + keys = { + { + "l", + ":lua require('lsp_lines').toggle()", + -- function() + -- require("lsp_lines").toggle() + -- end, + desc = "Toggle LSP Lines", + }, + }, +} diff --git a/vim/.vim/lua/plugins/trouble.lua b/vim/.vim/lua/plugins/trouble.lua new file mode 100644 index 0000000..8655be4 --- /dev/null +++ b/vim/.vim/lua/plugins/trouble.lua @@ -0,0 +1,35 @@ +return { + "folke/trouble.nvim", + event = "VimEnter", + config = function() + vim.diagnostic.config({ + virtual_lines = true, + virtual_text = true, + severity_sort = true, + update_in_insert = true, + }) + + -- Diagnostics + require("trouble").setup({ + signs = { + -- icons / text used for a diagnostic + error = " ", + warning = " ", + hint = " ", + information = " ", + other = "?﫠", + }, + use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client + }) + end, + keys = { + { "gr", "Trouble lsp_references" }, + { "xx", "Trouble" }, + { "xw", "Trouble workspace_diagnostics" }, + { "xd", "Trouble document_diagnostics" }, + { "xl", "Trouble loclist" }, + { "xq", "Trouble quickfix" }, + { "[g", "lua vim.diagnostic.goto_prev()" }, + { "]g", "lua vim.diagnostic.goto_next()" }, + }, +}