Compare commits

..

No commits in common. "10ffa92ad6481f93c9c6aaaef8bc7ac14479f480" and "29e65ee8b1e5843b9e5004a84ac38016c4fc14a6" have entirely different histories.

4 changed files with 13 additions and 174 deletions

View File

@ -1,19 +1,6 @@
-- WARN: Here be dragons
-- This section of the config is rather long and complex please be very sure to
-- read it all before making any changes
local utilities = require("sherlock5512.utilities")
local log = require("tjdevries.log")
local required = {'mason',
'mason-lspconfig',
'lspconfig',
'cmp_nvim_lsp',
'fidget',
'neodev',
'mason-null-ls',
'mason-nvim-dap',
'dap',
'dapui'}
local required = {'mason','mason-lspconfig','lspconfig','cmp_nvim_lsp','fidget','neodev','mason-null-ls','mason-nvim-dap','dap','dapui'}
local modules = utilities.require_modules(required)
if not modules then
@ -39,8 +26,7 @@ modules["mason-lspconfig"].setup_handlers {
["omnisharp"] = function ()
modules["lspconfig"]["omnisharp"].setup {
capabilities = capabilities,
on_attach = function (client,_)
client.server_capabilities.semanticTokensProvider = nil;
on_attach = function (_,_)
local gr = vim.api.nvim_create_augroup("CS-OnAttach",{})
vim.api.nvim_create_autocmd({"BufWritePre"}, {
group = gr,
@ -176,51 +162,20 @@ if not ok then
return
end
-- 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'
}
}
-- Wrapping since some distros still don't ship nvim 0.8
if vim.fn.exists('+winbar') ~= 0 then
local add = {
lspsaga.setup({
symbol_in_winbar = {
in_custom = false,
enable = true,
seperator = '>',
show_file = true,
click_support = false
}
}
config = vim.tbl_deep_extend('error', config,add)
},
diagnostic_header = { "", "", "", "" },
})
else
lspsaga.setup({
diagnostic_header = { "", "", "", "" },
})
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

@ -1,50 +0,0 @@
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

@ -1,64 +0,0 @@
local ok, trouble = pcall(require,'trouble')
if not ok then
return
end
trouble.setup({
mode = "document_diagnostics",
auto_open = true,
auto_close = true,
fold_open = "",
fold_close = "",
signs = {
error = "",
warning = "",
hint = "",
information = "",
other = "",
}
})
local map = vim.keymap.set
map('n',
'<leader>xx',
function()
trouble.toggle()
end,
{desc = "Toggle trouble"})
map('n',
'<leader>xw',
function()
trouble.toggle('workspace_diagnostics')
end,
{desc = "Toggle trouble (workspace)"})
map('n',
'<leader>xd',
function()
trouble.toggle('document_diagnostics')
end,
{desc = "Toggle trouble (document)"})
map('n',
'<leader>xq',
function()
trouble.toggle('quickfix')
end,
{desc = "Toggle trouble (quickfix)"})
map('n',
'<leader>xl',
function()
trouble.toggle('loclist')
end,
{desc = "Toggle trouble (loclist)"})
map('n',
'<leader>xt',
function()
trouble.toggle('todo')
end,
{desc = "Toggle trouble (todo)"})
local wk = require("which-key")
wk.register({ x = {name = "Trouble"}},{prefix = "<leader>"})

View File

@ -28,8 +28,8 @@ return require('packer').startup(function(use)
-- Looks
use { 'ellisonleao/gruvbox.nvim' } -- Apparently has better tresitter support.
use { 'nvim-lualine/lualine.nvim', -- Awesome status line
requires = {{'nvim-tree/nvim-web-devicons'}, -- With icons
use { 'nvim-lualine/lualine.nvim', -- Awesome status line
requires = {{'nvim-tree/nvim-web-devicons'},-- With icons
{'sherlock5512/lualine-spell-status'}} -- And spell status
}
use {'akinsho/bufferline.nvim',
@ -85,8 +85,6 @@ 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',