! 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:
Robert Morrison 2023-06-13 04:31:26 +01:00
parent 990b883e87
commit 10ffa92ad6
Signed by: robert
GPG Key ID: 73E012EB3F4EC696
3 changed files with 94 additions and 10 deletions

View File

@ -39,7 +39,8 @@ modules["mason-lspconfig"].setup_handlers {
["omnisharp"] = function () ["omnisharp"] = function ()
modules["lspconfig"]["omnisharp"].setup { modules["lspconfig"]["omnisharp"].setup {
capabilities = capabilities, capabilities = capabilities,
on_attach = function (_,_) on_attach = function (client,_)
client.server_capabilities.semanticTokensProvider = nil;
local gr = vim.api.nvim_create_augroup("CS-OnAttach",{}) local gr = vim.api.nvim_create_augroup("CS-OnAttach",{})
vim.api.nvim_create_autocmd({"BufWritePre"}, { vim.api.nvim_create_autocmd({"BufWritePre"}, {
group = gr, group = gr,
@ -175,20 +176,51 @@ if not ok then
return return
end 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 if vim.fn.exists('+winbar') ~= 0 then
lspsaga.setup({ local add = {
symbol_in_winbar = { symbol_in_winbar = {
in_custom = false, in_custom = false,
enable = true, enable = true,
seperator = '>', seperator = '>',
show_file = true, show_file = true,
click_support = false click_support = false
}, }
diagnostic_header = { "", "", "", "" }, }
}) config = vim.tbl_deep_extend('error', config,add)
else
lspsaga.setup({
diagnostic_header = { "", "", "", "" },
})
end 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>'})

View 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" }
}
}

View File

@ -85,6 +85,8 @@ return require('packer').startup(function(use)
use {'j-hui/fidget.nvim'} -- Show LSP status use {'j-hui/fidget.nvim'} -- Show LSP status
use {'folke/trouble.nvim', -- Show diagnostics in a window use {'folke/trouble.nvim', -- Show diagnostics in a window
requires = {'nvim-tree/nvim-web-devicons'}} requires = {'nvim-tree/nvim-web-devicons'}}
use {'folke/todo-comments.nvim',
requires = {'nvim-lua/plenary.nvim'}}
-- DAP -- DAP
use {'jay-babu/mason-nvim-dap.nvim', use {'jay-babu/mason-nvim-dap.nvim',