nvim: deprecate treesitter-context for navic
This commit is contained in:
parent
086d2a18dd
commit
6e6cdc261b
3 changed files with 70 additions and 87 deletions
|
@ -37,11 +37,11 @@ function M.config()
|
||||||
return navic.is_available()
|
return navic.is_available()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
color = { fg = "#d66622" },
|
color = { fg = "#ff8f00" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_x = { "filetype" },
|
lualine_x = { "filetype" },
|
||||||
lualine_y = { "location", "progress" },
|
lualine_y = { "location" },
|
||||||
lualine_z = { clock },
|
lualine_z = { clock },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
local M = {
|
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
function M.config()
|
|
||||||
local config = require("treesitter-context")
|
|
||||||
config.setup({
|
|
||||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
|
||||||
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
|
||||||
patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries.
|
|
||||||
-- For all filetypes
|
|
||||||
-- Note that setting an entry here replaces all other patterns for this entry.
|
|
||||||
-- By setting the 'default' entry below, you can control which nodes you want to
|
|
||||||
-- appear in the context window.
|
|
||||||
default = {
|
|
||||||
"class",
|
|
||||||
"function",
|
|
||||||
"method",
|
|
||||||
-- 'for', -- These won't appear in the context
|
|
||||||
-- 'while',
|
|
||||||
-- 'if',
|
|
||||||
-- 'switch',
|
|
||||||
-- 'case',
|
|
||||||
},
|
|
||||||
-- Example for a specific filetype.
|
|
||||||
-- If a pattern is missing, *open a PR* so everyone can benefit.
|
|
||||||
-- rust = {
|
|
||||||
-- 'impl_item',
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
exact_patterns = {
|
|
||||||
-- Example for a specific filetype with Lua patterns
|
|
||||||
-- Treat patterns.rust as a Lua pattern (i.e "^impl_item$" will
|
|
||||||
-- exactly match "impl_item" only)
|
|
||||||
-- rust = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- [!] The options below are exposed but shouldn't require your attention,
|
|
||||||
-- you can safely ignore them.
|
|
||||||
|
|
||||||
zindex = 20, -- The Z-index of the context window
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -58,6 +58,37 @@ function M.config()
|
||||||
GitSignsChangeNr({ fg = "#FFE0B2" }),
|
GitSignsChangeNr({ fg = "#FFE0B2" }),
|
||||||
|
|
||||||
IlluminatedWordText({ bg = "#FFEB3B" }),
|
IlluminatedWordText({ bg = "#FFEB3B" }),
|
||||||
|
NavicIcons({ fg = "#cc0000" }),
|
||||||
|
|
||||||
|
NavicIconsFile({ fg = "#cc0000" }),
|
||||||
|
NavicIconsModule({ fg = "#cc0000" }),
|
||||||
|
NavicIconsNamespace({ fg = "#cc0000" }),
|
||||||
|
NavicIconsPackage({ fg = "#cc0000" }),
|
||||||
|
NavicIconsClass({ fg = "#cc0000" }),
|
||||||
|
NavicIconsMethod({ fg = "#cc0000" }),
|
||||||
|
NavicIconsProperty({ fg = "#cc0000" }),
|
||||||
|
NavicIconsField({ fg = "#cc0000" }),
|
||||||
|
NavicIconsConstructor({ fg = "#cc0000" }),
|
||||||
|
NavicIconsEnum({ fg = "#cc0000" }),
|
||||||
|
NavicIconsInterface({ fg = "#cc0000" }),
|
||||||
|
NavicIconsFunction({ fg = "#cc0000" }),
|
||||||
|
NavicIconsVariable({ fg = "#cc0000" }),
|
||||||
|
NavicIconsConstant({ fg = "#cc0000" }),
|
||||||
|
NavicIconsString({ fg = "#cc0000" }),
|
||||||
|
NavicIconsNumber({ fg = "#cc0000" }),
|
||||||
|
NavicIconsBoolean({ fg = "#cc0000" }),
|
||||||
|
NavicIconsArray({ fg = "#cc0000" }),
|
||||||
|
NavicIconsObject({ fg = "#cc0000" }),
|
||||||
|
NavicIconsKey({ fg = "#cc0000" }),
|
||||||
|
NavicIconsKeyword({ fg = "#cc0000" }),
|
||||||
|
NavicIconsNull({ fg = "#cc0000" }),
|
||||||
|
NavicIconsEnumMember({ fg = "#cc0000" }),
|
||||||
|
NavicIconsStruct({ fg = "#cc0000" }),
|
||||||
|
NavicIconsEvent({ fg = "#cc0000" }),
|
||||||
|
NavicIconsOperator({ fg = "#cc0000" }),
|
||||||
|
NavicIconsTypeParameter({ fg = "#cc0000" }),
|
||||||
|
|
||||||
|
NavicText({ fg = "#cc0000", gui = "italic" }),
|
||||||
|
|
||||||
-- LspCodeLens({ fg = "#00ff00", gui = "undercurl" }),
|
-- LspCodeLens({ fg = "#00ff00", gui = "undercurl" }),
|
||||||
-- LspSignatureActiveParameter({ fg = "#ff0000", bg = "#ffffcc" }),
|
-- LspSignatureActiveParameter({ fg = "#ff0000", bg = "#ffffcc" }),
|
||||||
|
|
Loading…
Reference in a new issue