add lsp-lines

This commit is contained in:
ElKowar 2023-03-09 10:50:25 +01:00 committed by elkowar
parent 4332b09659
commit 0b51bce0e5
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
5 changed files with 16 additions and 4 deletions

View file

@ -74,6 +74,15 @@
(defn open-rename [] (defn open-rename []
(vim.api.nvim_feedkeys (.. ":IncRename " (vim.fn.expand "<cword>")) "n" "")) (vim.api.nvim_feedkeys (.. ":IncRename " (vim.fn.expand "<cword>")) "n" ""))
(defn toggle-lsp-lines []
(let [lsp-lines (require "lsp_lines")]
(vim.diagnostic.config {:virtual_lines (not (. (vim.diagnostic.config) :virtual_lines))})
; TODO: this doesn't seem to work...
(vim.diagnostic.config {:virtual_text (not (. (vim.diagnostic.config) :virtual_lines))})))
(defn toggle-lsp-lines-current []
(let [lsp-lines (require "lsp_lines")]
(vim.diagnostic.config {:virtual_lines {:only_current_line true}})))
(wk.setup {}) (wk.setup {})
(wk.register (wk.register
@ -120,6 +129,8 @@
"t" (cmd "Trouble lsp_type_definitions" "Go to type-definition") "t" (cmd "Trouble lsp_type_definitions" "Go to type-definition")
"i" (cmd "Trouble lsp_implementations" "Show implementation") "i" (cmd "Trouble lsp_implementations" "Show implementation")
"g" (cmd "Trouble lsp_definitions" "Go to definition") "g" (cmd "Trouble lsp_definitions" "Go to definition")
"w" [toggle-lsp-lines "Toggle LSP lines"]
"W" [toggle-lsp-lines-current "Toggle LSP line"]
"f" [format "format file"] "f" [format "format file"]
"," (cmd "RustRunnables" "Run rust stuff") "," (cmd "RustRunnables" "Run rust stuff")
"x" {:name "+Glance" "x" {:name "+Glance"

View file

@ -78,6 +78,8 @@
:lazy true :lazy true
:config #(setup :scrollbar)} :config #(setup :scrollbar)}
"https://git.sr.ht/~whynothugo/lsp_lines.nvim" {:config #(setup :lsp_lines)}
; editing and movement <<< ; editing and movement <<<
:jiangmiao/auto-pairs {} :jiangmiao/auto-pairs {}
@ -145,8 +147,6 @@
:lewis6991/gitsigns.nvim {:dependencies [:vim-gruvbox8 :lewis6991/gitsigns.nvim {:dependencies [:vim-gruvbox8
:petertriho/nvim-scrollbar] :petertriho/nvim-scrollbar]
:lazy true
:event "VeryLazy"
:config #(require "dots.plugins.gitsigns")} :config #(require "dots.plugins.gitsigns")}

View file

@ -18,7 +18,6 @@
(let [scrollbar-gitsigns (require "scrollbar.handlers.gitsigns")] (let [scrollbar-gitsigns (require "scrollbar.handlers.gitsigns")]
(scrollbar-gitsigns.setup)) (scrollbar-gitsigns.setup))
; the above code, but using vim.api.nvim_create_autocomand
(vim.api.nvim_create_autocmd (vim.api.nvim_create_autocmd
"ColorScheme" "ColorScheme"
{:pattern "*" {:pattern "*"

View file

@ -48,4 +48,5 @@
(utils.highlight-add :NoiceCmdlinePopupBorder {:fg colors.bright_aqua}) (utils.highlight-add :NoiceCmdlinePopupBorder {:fg colors.bright_aqua})
(utils.highlight-add :NoiceCmdlineIcon {:fg colors.bright_aqua})) (utils.highlight-add :NoiceCmdlineIcon {:fg colors.bright_aqua}))
(vim.defer_fn setup-noice-theme 50)
(vim.defer_fn setup-noice-theme 200)

View file

@ -51,6 +51,7 @@
"lazy.nvim": { "branch": "main", "commit": "e89acede13f46a5db229133cf0c87aee74938c56" }, "lazy.nvim": { "branch": "main", "commit": "e89acede13f46a5db229133cf0c87aee74938c56" },
>>>>>>> b86d8cc (work adjustments) >>>>>>> b86d8cc (work adjustments)
"litee.nvim": { "branch": "main", "commit": "bf366a1414fd0f9401631ac8884f2f9fa4bf18d2" }, "litee.nvim": { "branch": "main", "commit": "bf366a1414fd0f9401631ac8884f2f9fa4bf18d2" },
"lsp_lines.nvim": { "branch": "main", "commit": "ec98b45c8280e5ef8c84028d4f38aa447276c002" },
"lsp_signature.nvim": { "branch": "master", "commit": "6f6252f63b0baf0f2224c4caea33819a27f3f550" }, "lsp_signature.nvim": { "branch": "master", "commit": "6f6252f63b0baf0f2224c4caea33819a27f3f550" },
"neoformat": { "branch": "master", "commit": "891fad5829f91cbc3d0866f7abd028d233b8763e" }, "neoformat": { "branch": "master", "commit": "891fad5829f91cbc3d0866f7abd028d233b8763e" },
"neogit": { "branch": "master", "commit": "85380916cec322b1351785cac4f4e3f24de36b2a" }, "neogit": { "branch": "master", "commit": "85380916cec322b1351785cac4f4e3f24de36b2a" },