From caac70d22e98427cd32810acb21476011c374ba3 Mon Sep 17 00:00:00 2001 From: rebuilt Date: Sun, 31 Jul 2022 05:33:55 -0700 Subject: [PATCH 1/5] perf(cmp): remove redundant check for emmet-ls (#2830) --- lua/lvim/core/cmp.lua | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/lua/lvim/core/cmp.lua b/lua/lvim/core/cmp.lua index baf6279b..942a72f6 100644 --- a/lua/lvim/core/cmp.lua +++ b/lua/lvim/core/cmp.lua @@ -22,20 +22,6 @@ local function feedkeys(key, mode) end M.methods.feedkeys = feedkeys ----checks if emmet_ls is available and active in the buffer ----@return boolean true if available, false otherwise -local is_emmet_active = function() - local clients = vim.lsp.buf_get_clients() - - for _, client in pairs(clients) do - if client.name == "emmet_ls" then - return true - end - end - return false -end -M.methods.is_emmet_active = is_emmet_active - ---when inside a snippet, seeks to the nearest luasnip field if possible, and checks if it is jumpable ---@param dir number 1 for forward, -1 for backward; defaults to 1 ---@return boolean true if a jumpable luasnip field is found while inside a snippet @@ -257,7 +243,6 @@ M.config = function() [""] = cmp.mapping.select_next_item(), [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), - -- TODO: potentially fix emmet nonsense [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() @@ -267,8 +252,6 @@ M.config = function() luasnip.jump(1) elseif check_backspace() then fallback() - elseif is_emmet_active() then - return vim.fn["cmp#complete"]() else fallback() end From b8f681374b25740e0aea1c859bf313197ed63dd5 Mon Sep 17 00:00:00 2001 From: lvimuser <109605931+lvimuser@users.noreply.github.com> Date: Sun, 31 Jul 2022 11:51:12 -0300 Subject: [PATCH 2/5] fix(lvim/lsp/manager): make client_is_configured more reliable (#2851) --- lua/lvim/lsp/manager.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lvim/lsp/manager.lua b/lua/lvim/lsp/manager.lua index 9e898841..00643815 100644 --- a/lua/lvim/lsp/manager.lua +++ b/lua/lvim/lsp/manager.lua @@ -37,9 +37,9 @@ end -- which seems to occur only when attaching to single-files local function client_is_configured(server_name, ft) ft = ft or vim.bo.filetype - local active_autocmds = vim.split(vim.fn.execute("autocmd FileType " .. ft), "\n") + local active_autocmds = vim.api.nvim_get_autocmds { event = "FileType", pattern = ft } for _, result in ipairs(active_autocmds) do - if result:match(server_name) then + if result.command:match(server_name) then Log:debug(string.format("[%q] is already configured", server_name)) return true end From d7da056d7a0a6a47c53f769d09781ee56ea7a7dd Mon Sep 17 00:00:00 2001 From: lytex <32138262+lytex@users.noreply.github.com> Date: Sun, 31 Jul 2022 14:57:13 +0000 Subject: [PATCH 3/5] fix: use pcall for setting up project.nvim (#2762) --- lua/lvim/core/project.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lvim/core/project.lua b/lua/lvim/core/project.lua index 485137b7..e33d8720 100644 --- a/lua/lvim/core/project.lua +++ b/lua/lvim/core/project.lua @@ -41,7 +41,10 @@ function M.config() end function M.setup() - local project = require "project_nvim" + local status_ok, project = pcall(require, "project_nvim") + if not status_ok then + return + end project.setup(lvim.builtin.project) if lvim.builtin.project.on_config_done then From d6c81db7f5e7b2627b95410fa0f05c0b11d66001 Mon Sep 17 00:00:00 2001 From: CPea <42694704+cpea2506@users.noreply.github.com> Date: Sun, 31 Jul 2022 22:00:55 +0700 Subject: [PATCH 4/5] fix(nvimtree): remove `indent_markers` icons trailing space (#2854) --- lua/lvim/core/nvimtree.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/lvim/core/nvimtree.lua b/lua/lvim/core/nvimtree.lua index 9d7ab069..15e80e85 100644 --- a/lua/lvim/core/nvimtree.lua +++ b/lua/lvim/core/nvimtree.lua @@ -68,9 +68,10 @@ function M.config() indent_markers = { enable = false, icons = { - corner = "└ ", - edge = "│ ", - none = " ", + corner = "└", + edge = "│", + item = "│", + none = " ", }, }, icons = { From 1d9b85a50edd5ef643cf81974e92a5121645de19 Mon Sep 17 00:00:00 2001 From: XadE-Blue <9294002+XadE-Blue@users.noreply.github.com> Date: Sun, 31 Jul 2022 18:34:07 +0200 Subject: [PATCH 5/5] fix(installer) comment causes antivirus false positives (#2818) --- utils/installer/install.ps1 | 3 --- 1 file changed, 3 deletions(-) diff --git a/utils/installer/install.ps1 b/utils/installer/install.ps1 index 31f862f3..dcfa47f4 100644 --- a/utils/installer/install.ps1 +++ b/utils/installer/install.ps1 @@ -217,9 +217,6 @@ function setup_lvim() { $exampleConfig = "$env:LUNARVIM_BASE_DIR\utils\installer\config_win.example.lua" Copy-Item -Force "$exampleConfig" "$env:LUNARVIM_CONFIG_DIR\config.lua" - # FIXME: this has never worked - # Invoke-Expression "$INSTALL_PREFIX\bin\lvim.ps1 --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'" - Write-Host "Make sure to run `:PackerSync` at first launch" -ForegroundColor Green create_alias