This commit is contained in:
Henrik Bakken
2021-11-25 00:45:44 +01:00
parent 6700aa5f9e
commit 038672104b
+30 -6
View File
@@ -479,11 +479,6 @@ require("packer").startup {
map("n", "<F12>", "<cmd>Telescope<cr>", opts) map("n", "<F12>", "<cmd>Telescope<cr>", opts)
require("telescope").setup { require("telescope").setup {
defaults = { defaults = {
vimgrep_arguments = {
"rg", "--color=never", "--no-heading",
-- "--with-filename",
"--line-number", "--column", "--smart-case"
},
mappings = { mappings = {
i = { i = {
["<esc>"] = actions.close, ["<esc>"] = actions.close,
@@ -513,6 +508,35 @@ require("packer").startup {
} }
end end
} }
-- context
use {
"romgrk/nvim-treesitter-context",
requires = {"nvim-treesitter/nvim-treesitter"},
config = function()
require("treesitter-context").setup{
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
throttle = true, -- Throttles plugin updates (may improve performance)
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
patterns = {
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',
-- },
},
}
end
}
-- autocompletion -- autocompletion
use { use {
@@ -742,7 +766,7 @@ require("packer").startup {
"!ReferenceLink mapping", "!ReferenceLink mapping",
"!SeriesTensor mapping", "!SeriesTensor mapping",
"!SeriesTensorAccessor mapping", "!SeriesTensorAccessor mapping",
"!UDFfactory scalar", "!UDFnu scalar", "!UDFtensorfactory scalar", "!UDFnu scalar",
"!UDFvalidator scalar", "!Unit scalar", "!UDFvalidator scalar", "!Unit scalar",
"!UserClass mapping", "!UserInstance mapping", "!UserClass mapping", "!UserInstance mapping",
"!getattr mapping" "!getattr mapping"