summaryrefslogtreecommitdiff
path: root/lua/lvim/core
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2022-06-23 16:12:26 +0200
committerkylo252 <[email protected]>2022-06-23 16:12:26 +0200
commit57bebb5c51a4e93b283a5c65563254b9bfb492cf (patch)
tree8a6f0a3596e534002833038bea79d5ede57dc563 /lua/lvim/core
parentf1a672f8674f68d6a610b95fef29ed15339b3cbd (diff)
parent8989984b781367b2744c4857e73d8943311db241 (diff)
Merge branch 'rolling'
Diffstat (limited to 'lua/lvim/core')
-rw-r--r--lua/lvim/core/lualine/components.lua3
-rw-r--r--lua/lvim/core/nvimtree.lua9
-rw-r--r--lua/lvim/core/telescope.lua16
-rw-r--r--lua/lvim/core/which-key.lua1
4 files changed, 17 insertions, 12 deletions
diff --git a/lua/lvim/core/lualine/components.lua b/lua/lvim/core/lualine/components.lua
index b89bbd36..49a8ff81 100644
--- a/lua/lvim/core/lualine/components.lua
+++ b/lua/lvim/core/lualine/components.lua
@@ -110,7 +110,8 @@ return {
local supported_linters = linters.list_registered(buf_ft)
vim.list_extend(buf_client_names, supported_linters)
- return "[" .. table.concat(buf_client_names, ", ") .. "]"
+ local unique_client_names = vim.fn.uniq(buf_client_names)
+ return "[" .. table.concat(unique_client_names, ", ") .. "]"
end,
color = { gui = "bold" },
cond = conditions.hide_in_width,
diff --git a/lua/lvim/core/nvimtree.lua b/lua/lvim/core/nvimtree.lua
index 7f50f256..9d7ab069 100644
--- a/lua/lvim/core/nvimtree.lua
+++ b/lua/lvim/core/nvimtree.lua
@@ -148,7 +148,6 @@ function M.config()
},
},
}
- lvim.builtin.which_key.mappings["e"] = { "<cmd>NvimTreeToggle<CR>", "Explorer" }
end
function M.setup()
@@ -158,10 +157,14 @@ function M.setup()
return
end
- for opt, val in pairs(lvim.builtin.nvimtree) do
- vim.g["nvim_tree_" .. opt] = val
+ if lvim.builtin.nvimtree._setup_called then
+ Log:debug "ignoring repeated setup call for nvim-tree, see kyazdani42/nvim-tree.lua#1308"
+ return
end
+ lvim.builtin.which_key.mappings["e"] = { "<cmd>NvimTreeToggle<CR>", "Explorer" }
+ lvim.builtin.nvimtree._setup_called = true
+
-- Implicitly update nvim-tree when project module is active
if lvim.builtin.project.active then
lvim.builtin.nvimtree.setup.respect_buf_cwd = true
diff --git a/lua/lvim/core/telescope.lua b/lua/lvim/core/telescope.lua
index 6a04a866..f556913b 100644
--- a/lua/lvim/core/telescope.lua
+++ b/lua/lvim/core/telescope.lua
@@ -70,14 +70,14 @@ function M.config()
borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
color_devicons = true,
set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
- pickers = {
- find_files = {
- hidden = true,
- },
- live_grep = {
- --@usage don't include the filename in the search results
- only_sort_text = true,
- },
+ },
+ pickers = {
+ find_files = {
+ hidden = true,
+ },
+ live_grep = {
+ --@usage don't include the filename in the search results
+ only_sort_text = true,
},
},
extensions = {
diff --git a/lua/lvim/core/which-key.lua b/lua/lvim/core/which-key.lua
index b1ae6f87..3015781b 100644
--- a/lua/lvim/core/which-key.lua
+++ b/lua/lvim/core/which-key.lua
@@ -244,6 +244,7 @@ M.config = function()
c = { "<cmd>Telescope colorscheme<cr>", "Colorscheme" },
f = { "<cmd>Telescope find_files<cr>", "Find File" },
h = { "<cmd>Telescope help_tags<cr>", "Find Help" },
+ H = { "<cmd>Telescope highlights<cr>", "Find highlight groups" },
M = { "<cmd>Telescope man_pages<cr>", "Man Pages" },
r = { "<cmd>Telescope oldfiles<cr>", "Open Recent File" },
R = { "<cmd>Telescope registers<cr>", "Registers" },