! NASTY COMMIT !
This commit is here just to shore everything up before embarking on yet another full refresh of the config. This is likely going to be the last commit and it is very important if you are using this repo to check for a hopefully newly created "NIVM" repo. (Note: this may take time, I will archive this repo when I have a working NIVM)
This commit is contained in:
parent
990b883e87
commit
10ffa92ad6
|
|
@ -39,7 +39,8 @@ modules["mason-lspconfig"].setup_handlers {
|
|||
["omnisharp"] = function ()
|
||||
modules["lspconfig"]["omnisharp"].setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = function (_,_)
|
||||
on_attach = function (client,_)
|
||||
client.server_capabilities.semanticTokensProvider = nil;
|
||||
local gr = vim.api.nvim_create_augroup("CS-OnAttach",{})
|
||||
vim.api.nvim_create_autocmd({"BufWritePre"}, {
|
||||
group = gr,
|
||||
|
|
@ -175,20 +176,51 @@ if not ok then
|
|||
return
|
||||
end
|
||||
|
||||
-- Wrapping since some distros still don't ship nvim 0.8
|
||||
-- do some safe config
|
||||
|
||||
local config = { --shared config
|
||||
code_action = {
|
||||
num_shortcut = true,
|
||||
show_server_name = true,
|
||||
extend_gitsigns = true,
|
||||
},
|
||||
lightbulb = {
|
||||
enable = true,
|
||||
enable_in_insert = false,
|
||||
sign = true,
|
||||
virtual_text = false,
|
||||
},
|
||||
hover = {
|
||||
open_browser = '!$BROWSER'
|
||||
}
|
||||
}
|
||||
if vim.fn.exists('+winbar') ~= 0 then
|
||||
lspsaga.setup({
|
||||
local add = {
|
||||
symbol_in_winbar = {
|
||||
in_custom = false,
|
||||
enable = true,
|
||||
seperator = '>',
|
||||
show_file = true,
|
||||
click_support = false
|
||||
},
|
||||
diagnostic_header = { " ", " ", " ", "ﴞ " },
|
||||
})
|
||||
else
|
||||
lspsaga.setup({
|
||||
diagnostic_header = { " ", " ", " ", "ﴞ " },
|
||||
})
|
||||
}
|
||||
}
|
||||
config = vim.tbl_deep_extend('error', config,add)
|
||||
end
|
||||
|
||||
if vim.fn.has('nvim-0.9.0') ~= 0 then
|
||||
local add = { ui = {title = true} }
|
||||
config = vim.tbl_deep_extend('error', config,add )
|
||||
end
|
||||
lspsaga.setup(config)
|
||||
|
||||
-- Configure keybinds for lspsaga
|
||||
local map = vim.keymap.set
|
||||
map('n','<leader>ld', '<cmd>Lspsaga hover_doc<CR>' ,{desc = '[lspsaga] hoverdoc'})
|
||||
map('n','<leader>la', '<cmd>Lspsaga code_action<CR>', {desc = '[lspsaga] codeaction'})
|
||||
map('n','<leader>lr', '<cmd>Lspsaga rename<CR>', {desc = '[lspsaga] rename'})
|
||||
map('n','<leader>lo', '<cmd>Lspsaga outline<CR>', {desc = '[lspsaga] outline'})
|
||||
|
||||
|
||||
local wk = require('which-key')
|
||||
|
||||
wk.register({ l = {name = "LSP" }},{ prefix = '<leader>'})
|
||||
|
|
|
|||
50
after/plugin/todo-comments.lua
Normal file
50
after/plugin/todo-comments.lua
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
local ok, todo_comments = pcall(require,"todo-comments")
|
||||
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
|
||||
todo_comments.setup {
|
||||
signs = true,
|
||||
sign_priority = 8,
|
||||
|
||||
keywords= {
|
||||
FIX = {
|
||||
icon = "",
|
||||
color = "error",
|
||||
alt = {"FIXME", "BUG", "FIXIT", "ISSUE"}
|
||||
},
|
||||
TODO = { icon = "", color = "info"},
|
||||
HACK = { icon = "", color = "warning"},
|
||||
WARN = { icon = "", color = "warning", alt={"WARNING"}},
|
||||
PERF = { icon = "", alt = {"OPTIM", "PERFORMANCE", "OPTIMISE"}},
|
||||
NOTE = { icon = "", color = "hint", alt = {"INFO"}},
|
||||
TEST = { icon = "", color = "test", alt = {"TESTING ", "PASSED", "FAILED"}}
|
||||
},
|
||||
gui_style = {
|
||||
fg = "NONE",
|
||||
bg = "NONE"
|
||||
},
|
||||
merge_keywords = true,
|
||||
|
||||
highlight = {
|
||||
multiline = true,
|
||||
|
||||
before = "",
|
||||
keyword = "wide",
|
||||
after = "fg",
|
||||
|
||||
comments_only = true,
|
||||
max_line_len = 125,
|
||||
},
|
||||
|
||||
colors = {
|
||||
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
|
||||
warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
|
||||
info = { "DiagnosticInfo", "#2563EB" },
|
||||
hint = { "DiagnosticHint", "#10B981" },
|
||||
default = { "Identifier", "#7C3AED" },
|
||||
test = { "Identifier", "#FF00FF" }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -85,6 +85,8 @@ return require('packer').startup(function(use)
|
|||
use {'j-hui/fidget.nvim'} -- Show LSP status
|
||||
use {'folke/trouble.nvim', -- Show diagnostics in a window
|
||||
requires = {'nvim-tree/nvim-web-devicons'}}
|
||||
use {'folke/todo-comments.nvim',
|
||||
requires = {'nvim-lua/plenary.nvim'}}
|
||||
|
||||
-- DAP
|
||||
use {'jay-babu/mason-nvim-dap.nvim',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user