Nix hm #1
5 changed files with 42 additions and 38 deletions
|
|
@ -16,7 +16,7 @@ end
|
|||
-- Load keymaps before loading any plugins
|
||||
require("keymaps")
|
||||
|
||||
-- change and personalize native vim settings
|
||||
-- Change and personalize native vim settings
|
||||
vim.opt = require("vim_opt")
|
||||
|
||||
-- Initialize Lazy package manager
|
||||
|
|
@ -40,6 +40,9 @@ require("dap/setup")
|
|||
-- See ":help vim.highlight.on_yank()"
|
||||
setup_yank_highlight()
|
||||
|
||||
-- Change built in settings related to diagnostics
|
||||
require("diagnostics")
|
||||
|
||||
--[[
|
||||
-- Annoyances in Neovim environment:
|
||||
-- 1. codelldb doesn't terminate C++ program after debugging. : Don't know how to fix, have asked for help.
|
||||
|
|
|
|||
37
nvim/lua/diagnostics.lua
Normal file
37
nvim/lua/diagnostics.lua
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
local colors = require("ayu.colors")
|
||||
colors.generate(true)
|
||||
-- These are not apart of the Ayu color theme, however, I needed these
|
||||
-- colors while still fitting in with the rest
|
||||
local ayu_turquoise = "#5CCFE6"
|
||||
local ayu_dark_blue = "#3A7BD5"
|
||||
for _, highlight in ipairs({
|
||||
{ "DiagnosticUnderlineError", { undercurl = true, sp = colors.error } },
|
||||
{ "DiagnosticUnderlineWarn", { undercurl = true, sp = colors.warning } },
|
||||
{ "DiagnosticUnderlineHint", { undercurl = true, sp = ayu_turquoise } },
|
||||
{ "DiagnosticUnderlineInfo", { undercurl = true, sp = ayu_dark_blue } },
|
||||
}) do
|
||||
vim.api.nvim_set_hl(0, highlight[1], highlight[2])
|
||||
end
|
||||
|
||||
local sev = vim.diagnostic.severity
|
||||
vim.diagnostic.config({
|
||||
underline = true,
|
||||
virtual_text = {
|
||||
prefix = "●",
|
||||
},
|
||||
update_in_insert = true,
|
||||
signs = {
|
||||
text = {
|
||||
[sev.ERROR] = "",
|
||||
[sev.WARN] = "",
|
||||
[sev.INFO] = "",
|
||||
[sev.HINT] = "",
|
||||
},
|
||||
numhl = {
|
||||
[sev.WARN] = "WarningMsg",
|
||||
[sev.ERROR] = "ErrorMsg",
|
||||
[sev.INFO] = "DiagnosticInfo",
|
||||
[sev.HINT] = "DiagnosticHint",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
@ -58,13 +58,6 @@ end
|
|||
local global_capabilities = require("blink.cmp").get_lsp_capabilities()
|
||||
global_capabilities.offsetEncoding = { "utf-16" }
|
||||
|
||||
vim.diagnostic.config({
|
||||
underline = true, -- Underline diagnostic errors
|
||||
virtual_text = false, -- Disable inline text messages
|
||||
signs = true, -- Show icons in the sign column
|
||||
update_in_insert = true, -- Update diagnostics during insert mode
|
||||
})
|
||||
|
||||
vim.lsp.config("*", {
|
||||
capabilities = global_capabilities,
|
||||
handlers = {
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
return {
|
||||
"rachartier/tiny-inline-diagnostic.nvim",
|
||||
event = "VeryLazy",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("tiny-inline-diagnostic").setup()
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
})
|
||||
|
||||
local colors = require("ayu.colors")
|
||||
colors.generate(true)
|
||||
-- These are not apart of the Ayu color theme, however, I needed these
|
||||
-- colors while still fitting in with the rest
|
||||
local ayu_turquoise = "#5CCFE6"
|
||||
local ayu_dark_blue = "#3A7BD5"
|
||||
for _, highlight in ipairs({
|
||||
{ "DiagnosticUnderlineError", { undercurl = true, sp = colors.error } },
|
||||
{ "DiagnosticUnderlineWarn", { undercurl = true, sp = colors.warning } },
|
||||
{ "DiagnosticUnderlineHint", { undercurl = true, sp = ayu_turquoise } },
|
||||
{ "DiagnosticUnderlineInfo", { undercurl = true, sp = ayu_dark_blue } },
|
||||
}) do
|
||||
vim.api.nvim_set_hl(0, highlight[1], highlight[2])
|
||||
end
|
||||
end
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ opt.softtabstop = 4
|
|||
opt.shortmess:append("sI")
|
||||
|
||||
-- Signcolumn
|
||||
opt.signcolumn = "yes:2" -- Adds a spacing to the left which can contain gutter icons
|
||||
opt.signcolumn = "yes:1" -- Adds a spacing to the left which can contain gutter icons
|
||||
opt.fillchars = { eob = " " } -- Remove the fill character for empty lines which defaults to: "~"
|
||||
|
||||
-- Search
|
||||
|
|
@ -66,8 +66,6 @@ opt.termsync = true
|
|||
opt.scrolloff = 4
|
||||
|
||||
-- Whitespaces
|
||||
-- opt.listchars = { tab = "→\"", trail = "·", nbsp = "␣" }
|
||||
-- opt.list = true
|
||||
opt.list = false
|
||||
|
||||
return opt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue