1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-12 20:41:16 +02:00

nvim: fixed and replaced deprecated parts

This commit is contained in:
tiyn
2025-03-29 06:31:16 +01:00
parent b74a23af1d
commit e8901032db
8 changed files with 55 additions and 86 deletions

View File

@@ -52,7 +52,7 @@ wk.add({
{mode = "n", "<leader>sa", ":%S//g<Left><Left>", desc = "Substitute: free form", noremap = true},
{mode = "n", "<leader>ss", ":%S/\\<<C-r><C-w>\\>//g<Left><Left>", desc = "Substitute: word under cursor", noremap = true},
-- simrat39/symbols-outline.nvim
{mode = "n", "<F3>", ":SymbolsOutline<CR>", desc = "CTags: toggle"},
{mode = "n", "<F3>", ":Outline<CR>", desc = "CTags: toggle"},
-- nvim-tree/nvim-tree.lua
{mode = "n", "<F2>", ":NvimTreeToggle toggle<CR>", desc = "File tree: toggle"},
-- mbbill/undotree
@@ -70,9 +70,9 @@ wk.add({
-- folke/trouble.nvim
{mode = "n", "<leader>x", ":TroubleToggle<CR>", desc = "LSP: toggle error list"},
-- hrsh7th/nvim-cmp
{mode = "n", "gd", vim.lsp.buf.definition(), desc = "LSP: goto definition", noremap = true},
{mode = "n", "gD", vim.lsp.buf.declaration(), desc = "LSP: goto declaration", noremap = true},
{mode = "n", "gi", vim.lsp.buf.implementation(), desc = "LSP: list implementation", noremap = true},
{mode = "n", "gd", function() vim.lsp.buf.definition() end, desc = "LSP: goto definition", noremap = true},
{mode = "n", "gD", function() vim.lsp.buf.declaration() end, desc = "LSP: goto declaration", noremap = true},
{mode = "n", "gi", function() vim.lsp.buf.implementation() end, desc = "LSP: list implementation", noremap = true},
{mode = "n", "gr", function() vim.lsp.buf.references() end, desc = "LSP: list references", noremap = true},
{mode = "n", "K", vim.lsp.buf.hover(), desc = "LSP: show documentation", noremap = true},
{mode = "n", "<F8>", function() require("conform").format({ async = true, lsp_fallback = true }) end, desc = "LSP: format", noremap = true},

View File

@@ -15,7 +15,7 @@ return {
},
{ "tiyn/tccs.nvim" },
{
"roobert/action-hints.nvim",
"tiyn/action-hints.nvim",
config = function()
require("action-hints").setup({
template = {

View File

@@ -1,5 +1,5 @@
return {
"amrbashir/nvim-docs-view",
"tiyn/nvim-docs-view",
lazy = true,
cmd = "DocsViewToggle",
opts = {

View File

@@ -7,7 +7,7 @@ return {
-- automatically close html-tags
'windwp/nvim-ts-autotag',
-- color brackets
'p00f/nvim-ts-rainbow',
-- 'p00f/nvim-ts-rainbow',
},
config = function()
require("nvim-treesitter.configs").setup({
@@ -23,13 +23,13 @@ return {
},
highlight = { enable = true },
autotag = { enable = false },
rainbow = {
enable = true,
extended_mode = true,
max_file_lines = nil,
-- colors = {},
-- termcolors = {}
}
-- rainbow = {
-- enable = true,
-- extended_mode = true,
-- max_file_lines = nil,
-- -- colors = {},
-- -- termcolors = {}
-- }
})
end
}

View File

@@ -0,0 +1,13 @@
return {
{
"hedyhli/outline.nvim",
opts = {
outline_window = {
width = 25
},
symbols = {
icon_source = 'lspkind',
}
}
}
}

View File

@@ -1,39 +0,0 @@
return {
-- ctags like menu
{
"simrat39/symbols-outline.nvim",
opts = {
width = 25,
symbols = {
File = { icon = Lsp_signs.File, hl = "@text.uri" },
Module = { icon = Lsp_signs.Module, hl = "@namespace" },
Class = { icon = Lsp_signs.Class, hl = "@type" },
Method = { icon = Lsp_signs.Method, hl = "@method" },
Property = { icon = Lsp_signs.Property, hl = "@method" },
Field = { icon = Lsp_signs.Field, hl = "@field" },
Constructor = { icon = Lsp_signs.Constructor, hl = "@constructor" },
Enum = { icon = Lsp_signs.Enum, hl = "@type" },
Interface = { icon = Lsp_signs.Interface, hl = "@type" },
Function = { icon = Lsp_signs.Function, hl = "@function" },
Variable = { icon = Lsp_signs.Variable, hl = "@constant" },
Constant = { icon = Lsp_signs.Constant, hl = "@constant" },
Key = { icon = Lsp_signs.Keyword, hl = "@type" },
EnumMember = { icon = Lsp_signs.EnumMember, hl = "@field" },
Struct = { icon = Lsp_signs.Struct, hl = "@type" },
Event = { icon = Lsp_signs.Event, hl = "@type" },
Operator = { icon = Lsp_signs.Operator, hl = "@operator" },
TypeParameter = { icon = Lsp_signs.TypeParameter, hl = "@parameter" },
Boolean = { icon = Lsp_signs.Boolean, hl = "@boolean" },
Null = { icon = Lsp_signs.Null, hl = "@type" },
Component = { icon = Lsp_signs.Component, hl = "@function" },
Fragment = { icon = Lsp_signs.Fragment, hl = "@constant" },
Object = { icon = Lsp_signs.Object, hl = "@type" },
Array = { icon = Lsp_signs.Array, hl = "@constant" },
Number = { icon = Lsp_signs.Number, hl = "@number" },
String = { icon = Lsp_signs.String, hl = "@string" },
Namespace = { icon = Lsp_signs.Namespace, hl = "@namespace" },
Package = { icon = Lsp_signs.Package, hl = "@namespace" },
},
},
},
}

View File

@@ -21,6 +21,7 @@ Menu_signs = {
path = "",
}
Lsp_signs = {
Array = "",
Boolean = "",
@@ -106,22 +107,17 @@ Lualine_signs = {
unnamed = "",
}
vim.fn.sign_define(
"DiagnosticSignError",
{ texthl = "DiagnosticSignError", text = Error_sign, numhl = "DiagnosticSignError" }
)
vim.fn.sign_define(
"DiagnosticSignWarn",
{ texthl = "DiagnosticSignWarn", text = Warn_sign, numhl = "DiagnosticSignWarn" }
)
vim.fn.sign_define(
"DiagnosticSignInfo",
{ texthl = "DiagnosticSignInfo", text = Info_sign, numhl = "DiagnosticSignInfo" }
)
vim.fn.sign_define(
"DiagnosticSignHint",
{ texthl = "DiagnosticSignHint", text = Hint_sign, numhl = "DiagnosticSignHint" }
)
vim.diagnostic.config({
severity_sort = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = Error_sign,
[vim.diagnostic.severity.WARN] = Warn_sign,
[vim.diagnostic.severity.INFO] = Info_sign,
[vim.diagnostic.severity.HINT] = Hint_sign,
},
},
})
-- enable colorcolumn when textwidth is set
vim.o.cursorline = true