Compare commits

..

No commits in common. "9f07874772ac8dcda500be227c87d6d93ab01dde" and "813671fcb07da2800b6408105c75830befdabb32" have entirely different histories.

9 changed files with 116 additions and 100 deletions

View File

@ -8,18 +8,6 @@ local vanila_vim_autostart_commands = {
"set clipboard=unnamedplus" "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.termguicolors = true
vim.opt.fillchars = { eob = " " } vim.opt.fillchars = { eob = " " }
@ -30,7 +18,6 @@ end
if vim.lsp.inlay_hint then if vim.lsp.inlay_hint then
vim.lsp.inlay_hint.enable(true, { 0 }) vim.lsp.inlay_hint.enable(true, { 0 })
end end
require("config.lazy") require("config.lazy")
require("config.plugins.autotag") require("config.plugins.autotag")
require("config.plugins.autocomplete") require("config.plugins.autocomplete")
@ -42,7 +29,9 @@ require("config.plugins.gitsigns")
require("config.plugins.ibl") require("config.plugins.ibl")
require("config.plugins.hover_actions") require("config.plugins.hover_actions")
require("config.plugins.lsp_config") require("config.plugins.lsp_config")
require("config.plugins.lsp_diagnostic")
require("config.plugins.lualine") require("config.plugins.lualine")
require("config.plugins.navic")
require("config.plugins.noice") require("config.plugins.noice")
require("toggleterm").setup() require("toggleterm").setup()
require("config.plugins.telescope") require("config.plugins.telescope")

View File

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

View File

@ -1,11 +1,5 @@
local lspconfig = require("lspconfig") 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.clangd.setup({})
lspconfig.lua_ls.setup({ lspconfig.lua_ls.setup({

View File

@ -0,0 +1,5 @@
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,5 +1,7 @@
local _colors = { "DiffAdd", "DiffChange", "RedrawDebugRecompose" } local _colors = { "DiffAdd", "DiffChange", "RedrawDebugRecompose" }
require("lualine").setup({ require("lualine").setup({
options = { options = {
icons_enabled = true, icons_enabled = true,
@ -40,31 +42,7 @@ require("lualine").setup({
source = nil, -- A function that works as a data source for diff. source = nil, -- A function that works as a data source for diff.
} }
}, },
lualine_x = { 'encoding', 'filetype', lualine_x = { 'encoding', 'filetype', 'diagnostics', 'lsp' },
{
'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_y = { 'progress' },
lualine_z = { 'location' } lualine_z = { 'location' }
}, },

View File

@ -0,0 +1,47 @@
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,57 +1,52 @@
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({ require("neo-tree").setup({
close_if_last_window = false, close_if_last_window = false,
popup_border_style = "rounded", popup_border_style = "rounded",
enable_git_status = true, enable_git_status = true,
enable_diagnostics = true, enable_diagnostics = true,
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
sort_case_insensitive = false, sort_case_insensitive = false,
sort_function = nil, sort_function = nil ,
default_component_configs = { default_component_configs = {
diagnostics = { indent = {
symbols = { with_expanders = true,
hint = '󰌵', },
info = '󰬐', icon = {
warn = '󰀧', folder_closed = "󰉋",
error = '󰅗', folder_open = "󰝰",
}, folder_empty = "󰉖",
highlights = { default = "*",
hint = "DiagnosticSignHint", highlight = "NeoTreeFileIcon"
info = "DiagnosticSignInfo", },
warn = "DiagnosticSignWarn", modified = {
error = "DiagnosticSignError", symbol = "󰧞",
}, highlight = "NeoTreeModified",
}, },
indent = { name = {
with_expanders = true, trailing_slash = false,
}, use_git_status_colors = true,
icon = { highlight = "NeoTreeFileName",
folder_closed = "󰉋", },
folder_open = "󰝰", git_status = {
folder_empty = "󰉖", symbols = {
default = "*", added = "󰜄",
highlight = "NeoTreeFileIcon" modified = "󰑕",
}, deleted = "󰅗",
modified = { renamed = "󰛂",
symbol = "󰧞", untracked = "󰞋",
highlight = "NeoTreeModified", ignored = "󰿠",
}, unstaged = "󰄱",
name = { staged = "󰄵",
trailing_slash = false, conflict = "",
use_git_status_colors = true, }
highlight = "NeoTreeFileName", },
}, },
git_status = {
symbols = {
added = "󰜄",
modified = "󰑕",
deleted = "󰅗",
renamed = "󰛂",
untracked = "󰞋",
ignored = "󰿠",
unstaged = "󰄱",
staged = "󰄵",
conflict = "",
}
},
},
}) })

View File

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

View File

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