Compare commits
4 Commits
813671fcb0
...
9f07874772
Author | SHA1 | Date | |
---|---|---|---|
|
9f07874772 | ||
|
9609e2d7eb | ||
|
3f05e62ac8 | ||
|
cd7e91f688 |
15
init.lua
15
init.lua
|
@ -8,6 +8,18 @@ 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 = " " }
|
||||||
|
|
||||||
|
@ -18,6 +30,7 @@ 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")
|
||||||
|
@ -29,9 +42,7 @@ 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")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
local cmp = require "cmp"
|
local cmp = require("cmp")
|
||||||
|
|
||||||
local kind_icons = {
|
local kind_icons = {
|
||||||
Text = "",
|
Text = "",
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
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({
|
||||||
|
|
|
@ -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
|
|
|
@ -1,7 +1,5 @@
|
||||||
local _colors = { "DiffAdd", "DiffChange", "RedrawDebugRecompose" }
|
local _colors = { "DiffAdd", "DiffChange", "RedrawDebugRecompose" }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
require("lualine").setup({
|
require("lualine").setup({
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
|
@ -42,7 +40,31 @@ 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', '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_y = { 'progress' },
|
||||||
lualine_z = { 'location' }
|
lualine_z = { 'location' }
|
||||||
},
|
},
|
||||||
|
|
|
@ -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,
|
|
||||||
}
|
|
||||||
|
|
|
@ -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({
|
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 = {
|
||||||
indent = {
|
diagnostics = {
|
||||||
with_expanders = true,
|
symbols = {
|
||||||
},
|
hint = '',
|
||||||
icon = {
|
info = '',
|
||||||
folder_closed = "",
|
warn = '',
|
||||||
folder_open = "",
|
error = '',
|
||||||
folder_empty = "",
|
},
|
||||||
default = "*",
|
highlights = {
|
||||||
highlight = "NeoTreeFileIcon"
|
hint = "DiagnosticSignHint",
|
||||||
},
|
info = "DiagnosticSignInfo",
|
||||||
modified = {
|
warn = "DiagnosticSignWarn",
|
||||||
symbol = "",
|
error = "DiagnosticSignError",
|
||||||
highlight = "NeoTreeModified",
|
},
|
||||||
},
|
},
|
||||||
name = {
|
indent = {
|
||||||
trailing_slash = false,
|
with_expanders = true,
|
||||||
use_git_status_colors = true,
|
},
|
||||||
highlight = "NeoTreeFileName",
|
icon = {
|
||||||
},
|
folder_closed = "",
|
||||||
git_status = {
|
folder_open = "",
|
||||||
symbols = {
|
folder_empty = "",
|
||||||
added = "",
|
default = "*",
|
||||||
modified = "",
|
highlight = "NeoTreeFileIcon"
|
||||||
deleted = "",
|
},
|
||||||
renamed = "",
|
modified = {
|
||||||
untracked = "",
|
symbol = "",
|
||||||
ignored = "",
|
highlight = "NeoTreeModified",
|
||||||
unstaged = "",
|
},
|
||||||
staged = "",
|
name = {
|
||||||
conflict = "",
|
trailing_slash = false,
|
||||||
}
|
use_git_status_colors = true,
|
||||||
},
|
highlight = "NeoTreeFileName",
|
||||||
},
|
},
|
||||||
|
git_status = {
|
||||||
|
symbols = {
|
||||||
|
added = "",
|
||||||
|
modified = "",
|
||||||
|
deleted = "",
|
||||||
|
renamed = "",
|
||||||
|
untracked = "",
|
||||||
|
ignored = "",
|
||||||
|
unstaged = "",
|
||||||
|
staged = "",
|
||||||
|
conflict = "",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
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 = {
|
||||||
|
|
|
@ -32,9 +32,6 @@ return {
|
||||||
{
|
{
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"SmiteshP/nvim-navic",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"kyazdani42/nvim-web-devicons"
|
"kyazdani42/nvim-web-devicons"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue