Compare commits

..

4 Commits

Author SHA1 Message Date
doryan 9f07874772 add patentheses 2025-04-17 18:41:21 +04:00
doryan 9609e2d7eb feat(sings): use new diagnostic configuration + improve UI 2025-04-17 18:40:46 +04:00
doryan 3f05e62ac8 feat(plugin): remove nvim-navic
feat(plugin): remove nvim-navic
2025-04-17 18:40:05 +04:00
doryan cd7e91f688 feat(signs): remove deprecated diagnostic signs configuration 2025-04-17 18:39:12 +04:00
9 changed files with 100 additions and 116 deletions

View File

@ -8,6 +8,18 @@ local vanila_vim_autostart_commands = {
"set clipboard=unnamedplus"
}
vim.diagnostic.config({
virtual_text = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '󰅗 ',
[vim.diagnostic.severity.WARN] = '󰀧 ',
[vim.diagnostic.severity.INFO] = '󰬐',
[vim.diagnostic.severity.HINT] = '󰌵',
},
}
})
vim.opt.termguicolors = true
vim.opt.fillchars = { eob = " " }
@ -18,6 +30,7 @@ end
if vim.lsp.inlay_hint then
vim.lsp.inlay_hint.enable(true, { 0 })
end
require("config.lazy")
require("config.plugins.autotag")
require("config.plugins.autocomplete")
@ -29,9 +42,7 @@ require("config.plugins.gitsigns")
require("config.plugins.ibl")
require("config.plugins.hover_actions")
require("config.plugins.lsp_config")
require("config.plugins.lsp_diagnostic")
require("config.plugins.lualine")
require("config.plugins.navic")
require("config.plugins.noice")
require("toggleterm").setup()
require("config.plugins.telescope")

View File

@ -1,4 +1,4 @@
local cmp = require "cmp"
local cmp = require("cmp")
local kind_icons = {
Text = "",

View File

@ -1,5 +1,11 @@
local lspconfig = require("lspconfig")
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = true
}
)
lspconfig.clangd.setup({})
lspconfig.lua_ls.setup({

View File

@ -1,5 +0,0 @@
local signs = { Error = "", Warn = "", Hint = "󱩎 ", Info = "" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
end

View File

@ -1,7 +1,5 @@
local _colors = { "DiffAdd", "DiffChange", "RedrawDebugRecompose" }
require("lualine").setup({
options = {
icons_enabled = true,
@ -42,7 +40,31 @@ require("lualine").setup({
source = nil, -- A function that works as a data source for diff.
}
},
lualine_x = { 'encoding', 'filetype', 'diagnostics', 'lsp' },
lualine_x = { 'encoding', 'filetype',
{
'diagnostics',
sources = { 'nvim_diagnostic', 'coc' },
sections = { 'error', 'warn', 'info', 'hint' },
diagnostics_color = {
error = 'DiagnosticError', -- Changes diagnostics' error color.
warn = 'DiagnosticWarn', -- Changes diagnostics' warn color.
info = 'DiagnosticInfo', -- Changes diagnostics' info color.
hint = 'DiagnosticHint', -- Changes diagnostics' hint color.
},
symbols = {
hint = '󰌵 ',
info = '󰬐 ',
warn = '󰀧 ',
error = '󰅗 ',
},
colored = true, -- Displays diagnostics status in color if set to true.
update_in_insert = false, -- Update diagnostics in insert mode.
always_visible = false, -- Show diagnostics even if there are none.
}
},
lualine_y = { 'progress' },
lualine_z = { 'location' }
},

View File

@ -1,47 +0,0 @@
local navic = require("nvim-navic")
navic.setup {
icons = {
File = "󰈙 ",
Module = "",
Namespace = "󰌗 ",
Package = "",
Class = "󰌗 ",
Method = "󰆧 ",
Property = "",
Field = "",
Constructor = "",
Enum = "󰕘",
Interface = "󰕘",
Function = "󰊕 ",
Variable = "󰆧 ",
Constant = "󰏿 ",
String = "󰀬 ",
Number = "󰎠 ",
Boolean = "",
Array = "󰅪 ",
Object = "󰅩 ",
Key = "󰌋 ",
Null = "󰟢 ",
EnumMember = "",
Struct = "󰌗 ",
Event = "",
Operator = "󰆕 ",
TypeParameter = "󰊄 ",
},
lsp = {
auto_attach = true,
preference = nil,
},
highlight = true,
seperator = '',
depth_limit = 0,
depth_limit_indicator = "..",
safe_output = true,
lazy_update_context = false,
click = false,
format_text = function(text)
return text
end,
}

View File

@ -1,52 +1,57 @@
vim.fn.sign_define("LspDiagnosticsSignError",
{text = "󰅙 ", texthl = "LspDiagnosticsSignError"})
vim.fn.sign_define("LspDiagnosticsSignWarning",
{text = "󱇎 ", texthl = "LspDiagnosticsSignWarning"})
vim.fn.sign_define("LspDiagnosticsSignInformation",
{text = "󰰄 ", texthl = "LspDiagnosticsSignInformation"})
vim.fn.sign_define("LspDiagnosticsSignHint",
{text = "󰐗 ", texthl = "LspDiagnosticsSignHint"})
require("neo-tree").setup({
close_if_last_window = false,
popup_border_style = "rounded",
enable_git_status = true,
enable_diagnostics = true,
open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
sort_case_insensitive = false,
sort_function = nil ,
default_component_configs = {
indent = {
with_expanders = true,
},
icon = {
folder_closed = "󰉋",
folder_open = "󰝰",
folder_empty = "󰉖",
default = "*",
highlight = "NeoTreeFileIcon"
},
modified = {
symbol = "󰧞",
highlight = "NeoTreeModified",
},
name = {
trailing_slash = false,
use_git_status_colors = true,
highlight = "NeoTreeFileName",
},
git_status = {
symbols = {
added = "󰜄",
modified = "󰑕",
deleted = "󰅗",
renamed = "󰛂",
untracked = "󰞋",
ignored = "󰿠",
unstaged = "󰄱",
staged = "󰄵",
conflict = "",
}
},
},
close_if_last_window = false,
popup_border_style = "rounded",
enable_git_status = true,
enable_diagnostics = true,
open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
sort_case_insensitive = false,
sort_function = nil,
default_component_configs = {
diagnostics = {
symbols = {
hint = '󰌵',
info = '󰬐',
warn = '󰀧',
error = '󰅗',
},
highlights = {
hint = "DiagnosticSignHint",
info = "DiagnosticSignInfo",
warn = "DiagnosticSignWarn",
error = "DiagnosticSignError",
},
},
indent = {
with_expanders = true,
},
icon = {
folder_closed = "󰉋",
folder_open = "󰝰",
folder_empty = "󰉖",
default = "*",
highlight = "NeoTreeFileIcon"
},
modified = {
symbol = "󰧞",
highlight = "NeoTreeModified",
},
name = {
trailing_slash = false,
use_git_status_colors = true,
highlight = "NeoTreeFileName",
},
git_status = {
symbols = {
added = "󰜄",
modified = "󰑕",
deleted = "󰅗",
renamed = "󰛂",
untracked = "󰞋",
ignored = "󰿠",
unstaged = "󰄱",
staged = "󰄵",
conflict = "",
}
},
},
})

View File

@ -1,10 +1,5 @@
local navic = require("nvim-navic")
vim.g.rustaceanvim = {
server = {
on_attach = function(client, bufnr)
navic.attach(client, bufnr)
end,
settings = {
['rust-analyzer'] = {
procMacro = {

View File

@ -32,9 +32,6 @@ return {
{
"hrsh7th/cmp-nvim-lsp",
},
{
"SmiteshP/nvim-navic",
},
{
"kyazdani42/nvim-web-devicons"
},