From 038672104b983d4d22d6ea7440d5566c1f8d36f9 Mon Sep 17 00:00:00 2001 From: Henrik Bakken Date: Thu, 25 Nov 2021 00:45:44 +0100 Subject: [PATCH] updates --- nvim/init.lua | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/nvim/init.lua b/nvim/init.lua index 6a486b0..33db3ba 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -479,11 +479,6 @@ require("packer").startup { map("n", "", "Telescope", opts) require("telescope").setup { defaults = { - vimgrep_arguments = { - "rg", "--color=never", "--no-heading", - -- "--with-filename", - "--line-number", "--column", "--smart-case" - }, mappings = { i = { [""] = actions.close, @@ -513,6 +508,35 @@ require("packer").startup { } 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 use { @@ -742,7 +766,7 @@ require("packer").startup { "!ReferenceLink mapping", "!SeriesTensor mapping", "!SeriesTensorAccessor mapping", - "!UDFfactory scalar", "!UDFnu scalar", + "!UDFtensorfactory scalar", "!UDFnu scalar", "!UDFvalidator scalar", "!Unit scalar", "!UserClass mapping", "!UserInstance mapping", "!getattr mapping"