From 75cfebbfeea3bfa1437e019812747ab7fe3dd25e Mon Sep 17 00:00:00 2001 From: Pascal Hubrecht Date: Thu, 21 Apr 2022 23:17:24 +0200 Subject: fix(nvimtree): escape the dot character in custom filter (#2493) --- lua/lvim/core/nvimtree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/lvim/core/nvimtree.lua b/lua/lvim/core/nvimtree.lua index bcdf963d..33d5fce8 100644 --- a/lua/lvim/core/nvimtree.lua +++ b/lua/lvim/core/nvimtree.lua @@ -68,7 +68,7 @@ function M.config() }, filters = { dotfiles = false, - custom = { "node_modules", ".cache" }, + custom = { "node_modules", "\\.cache" }, }, trash = { cmd = "trash", -- cgit v1.2.3 From 8fdd4b46e8b91f62c11efd90153623e299748723 Mon Sep 17 00:00:00 2001 From: Abouzar Parvan Date: Fri, 22 Apr 2022 15:11:21 +0430 Subject: feat(peek): make sure max width and height are customizable (#2492) --- lua/lvim/lsp/config.lua | 5 +++++ lua/lvim/lsp/peek.lua | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'lua') diff --git a/lua/lvim/lsp/config.lua b/lua/lvim/lsp/config.lua index 182f8fbf..eada4ce7 100644 --- a/lua/lvim/lsp/config.lua +++ b/lua/lvim/lsp/config.lua @@ -78,6 +78,11 @@ return { style = "minimal", border = "rounded", }, + peek = { + max_height = 15, + max_width = 30, + context = 10, + }, on_attach_callback = nil, on_init_callback = nil, automatic_servers_installation = true, diff --git a/lua/lvim/lsp/peek.lua b/lua/lvim/lsp/peek.lua index eb774a77..65c67e92 100644 --- a/lua/lvim/lsp/peek.lua +++ b/lua/lvim/lsp/peek.lua @@ -29,7 +29,10 @@ local function create_floating_file(location, opts) local contents = vim.api.nvim_buf_get_lines( bufnr, range.start.line, - math.min(range["end"].line + 1 + (opts.context or 10), range.start.line + (opts.max_height or 15)), -- Don't let the window be more that 15 lines long(height) + math.min( + range["end"].line + 1 + (opts.context or lvim.lsp.peek.max_height), + range.start.line + (opts.max_height or lvim.lsp.peek.max_height) + ), false ) if next(contents) == nil then @@ -38,7 +41,11 @@ local function create_floating_file(location, opts) end local width, height = vim.lsp.util._make_floating_popup_size(contents, opts) local if_nil = vim.F.if_nil - opts = vim.lsp.util.make_floating_popup_options(if_nil(width, 30), if_nil(height, 10), opts) + opts = vim.lsp.util.make_floating_popup_options( + if_nil(width, lvim.lsp.peek.max_width), + if_nil(height, lvim.lsp.peek.max_height), + opts + ) -- Don't make it minimal as it is meant to be fully featured opts["style"] = nil @@ -65,7 +72,7 @@ local function preview_location_callback(result) local opts = { border = "rounded", - context = 10, + context = lvim.lsp.peek.context, } if vim.tbl_islist(result) then -- cgit v1.2.3 From 74d93dcc0587d48ce3ab9472791f0de709ca828a Mon Sep 17 00:00:00 2001 From: Abouzar Parvan Date: Sat, 23 Apr 2022 16:23:16 +0430 Subject: fix(nvimtree): make sure on_config_done is using the correct require (#2509) --- lua/lvim/core/nvimtree.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lua') diff --git a/lua/lvim/core/nvimtree.lua b/lua/lvim/core/nvimtree.lua index 33d5fce8..385708ed 100644 --- a/lua/lvim/core/nvimtree.lua +++ b/lua/lvim/core/nvimtree.lua @@ -122,9 +122,9 @@ function M.config() end function M.setup() - local status_ok, nvim_tree_config = pcall(require, "nvim-tree.config") + local status_ok, nvim_tree = pcall(require, "nvim-tree") if not status_ok then - Log:error "Failed to load nvim-tree.config" + Log:error "Failed to load nvim-tree" return end @@ -158,11 +158,11 @@ function M.setup() } end + nvim_tree.setup(lvim.builtin.nvimtree.setup) + if lvim.builtin.nvimtree.on_config_done then - lvim.builtin.nvimtree.on_config_done(nvim_tree_config) + lvim.builtin.nvimtree.on_config_done(nvim_tree) end - - require("nvim-tree").setup(lvim.builtin.nvimtree.setup) end function M.start_telescope(telescope_mode) -- cgit v1.2.3 From 3de829e76ed3d90b25250b1ab76f6425146af9d2 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Wed, 27 Apr 2022 17:37:27 +0200 Subject: refactor: lock new installations to nvim v0.7+ (#2526) --- lua/lvim/plugins.lua | 1 - 1 file changed, 1 deletion(-) (limited to 'lua') diff --git a/lua/lvim/plugins.lua b/lua/lvim/plugins.lua index f3b4d7c6..1b885a09 100644 --- a/lua/lvim/plugins.lua +++ b/lua/lvim/plugins.lua @@ -114,7 +114,6 @@ local core_plugins = { -- Treesitter { "nvim-treesitter/nvim-treesitter", - branch = vim.fn.has "nvim-0.6" == 1 and "master" or "0.5-compat", -- run = ":TSUpdate", config = function() require("lvim.core.treesitter").setup() -- cgit v1.2.3