aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Matei Pintilie <luca@lucamatei.com>2024-03-20 20:30:21 +0000
committerLuca Matei Pintilie <luca@lucamatei.com>2024-03-20 20:30:21 +0000
commit8b59311a6803f9e5600918605e07f7878cc334cc (patch)
tree856a1767eff1e5f1e3334d16f414d882120f9a29
parent54e4e18a13375cbb69ec475aafab3946fbc7a613 (diff)
downloaddotfiles-8b59311a6803f9e5600918605e07f7878cc334cc.tar
dotfiles-8b59311a6803f9e5600918605e07f7878cc334cc.tar.gz
dotfiles-8b59311a6803f9e5600918605e07f7878cc334cc.tar.bz2
dotfiles-8b59311a6803f9e5600918605e07f7878cc334cc.tar.lz
dotfiles-8b59311a6803f9e5600918605e07f7878cc334cc.tar.xz
dotfiles-8b59311a6803f9e5600918605e07f7878cc334cc.tar.zst
dotfiles-8b59311a6803f9e5600918605e07f7878cc334cc.zip
nvim: Add CodeLens and missing dap dependency
-rw-r--r--.config/nvim/lua/plugins.lua52
1 files changed, 52 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
index 4a66b42..3faa751 100644
--- a/.config/nvim/lua/plugins.lua
+++ b/.config/nvim/lua/plugins.lua
@@ -77,7 +77,9 @@ local PKGS = {
{ url = "https://github.com/rcarriga/nvim-dap-ui.git" };
{ url = "https://github.com/antoinemadec/FixCursorHold.nvim.git" };
{ url = "https://github.com/nvim-neotest/neotest.git" };
+ { url = "https://github.com/nvim-neotest/nvim-nio.git" };
{ url = "https://github.com/Issafalcon/neotest-dotnet.git" };
+ { url = "https://github.com/VidocqH/lsp-lens.nvim.git" };
-- Dev container
{ url = "https://codeberg.org/esensar/nvim-dev-container.git" };
@@ -107,6 +109,7 @@ local function init_plugins()
local telescope = require("telescope")
local telescopeConfig = require("telescope.config")
local previewers = require("telescope.previewers")
+ local lsp_lens = require('lsp-lens')
local _bad = { ".*%.cshtml" }
local bad_files = function(filepath)
@@ -380,6 +383,55 @@ local function init_plugins()
};
};
})
+
+ local SymbolKind = vim.lsp.protocol.SymbolKind
+
+ local all_symbols = {
+ vim.lsp.protocol.SymbolKind.File,
+ vim.lsp.protocol.SymbolKind.Module,
+ vim.lsp.protocol.SymbolKind.Namespace,
+ vim.lsp.protocol.SymbolKind.Package,
+ vim.lsp.protocol.SymbolKind.Class,
+ vim.lsp.protocol.SymbolKind.Method,
+ vim.lsp.protocol.SymbolKind.Property,
+ vim.lsp.protocol.SymbolKind.Field,
+ vim.lsp.protocol.SymbolKind.Constructor,
+ vim.lsp.protocol.SymbolKind.Enum,
+ vim.lsp.protocol.SymbolKind.Interface,
+ vim.lsp.protocol.SymbolKind.Function,
+ vim.lsp.protocol.SymbolKind.Variable,
+ vim.lsp.protocol.SymbolKind.Constant,
+ vim.lsp.protocol.SymbolKind.String,
+ vim.lsp.protocol.SymbolKind.Number,
+ vim.lsp.protocol.SymbolKind.Boolean,
+ vim.lsp.protocol.SymbolKind.Array,
+ vim.lsp.protocol.SymbolKind.Object,
+ vim.lsp.protocol.SymbolKind.Key,
+ vim.lsp.protocol.SymbolKind.Null,
+ vim.lsp.protocol.SymbolKind.EnumMember,
+ vim.lsp.protocol.SymbolKind.Struct,
+ vim.lsp.protocol.SymbolKind.Event,
+ vim.lsp.protocol.SymbolKind.Operator,
+ vim.lsp.protocol.SymbolKind.TypeParameter,
+ }
+
+ lsp_lens.setup({
+ enable = false,
+ include_declaration = false, -- Reference include declaration
+ sections = { -- Enable / Disable specific request, formatter example looks 'Format Requests'
+ definition = true,
+ references = true,
+ implements = true,
+ git_authors = false,
+ },
+ ignore_filetype = {
+ "prisma",
+ },
+ -- Target Symbol Kinds to show lens information
+ target_symbol_kinds = all_symbols, -- { SymbolKind.Function, SymbolKind.Method, SymbolKind.Interface, },
+ -- Symbol Kinds that may have target symbol kinds as children
+ wrapper_symbol_kinds = { SymbolKind.Class, SymbolKind.Struct, SymbolKind.Enum, SymbolKind.Interface, },
+ })
end
local function clone_paq()