Explorar o código

fix: patches since release (#4119)

Christian Chiarulli %!s(int64=2) %!d(string=hai) anos
pai
achega
58bb5605cf

+ 3 - 3
.github/workflows/install.yaml

@@ -21,10 +21,10 @@ jobs:
         include:
           - runner: ubuntu-latest
             os: linux
-            neovim: v0.8.0
+            neovim: v0.9.0
           - runner: macos-latest
             os: osx
-            neovim: v0.8.0
+            neovim: v0.9.0
           - runner: ubuntu-22.04
             os: linux
             neovim: nightly
@@ -78,7 +78,7 @@ jobs:
         uses: rhysd/action-setup-vim@v1
         with:
           neovim: true
-          version: v0.8.0
+          version: v0.9.0
 
       - name: Install LunarVim
         timeout-minutes: 4

+ 134 - 0
CHANGELOG.md

@@ -2,6 +2,140 @@
 
 All notable changes to this project will be documented in this file.
 
+## [unreleased]
+
+### <!-- 1 --> Features
+
+- _(alpha)_ allow configuring highlight groups ([#3532](https://github.com/lunarvim/lunarvim/pull/3532))
+- _(alpha)_ add quit button to dashboard ([#3767](https://github.com/lunarvim/lunarvim/pull/3767))
+- _(autocmds)_ add `NvimTreeNormalNC` to transparent mode ([#3850](https://github.com/lunarvim/lunarvim/pull/3850))
+- _(cmp)_ add on_config_done callback ([#3589](https://github.com/lunarvim/lunarvim/pull/3589))
+- _(dap)_ update dap ui to resize when toggled ([#3606](https://github.com/lunarvim/lunarvim/pull/3606))
+- _(dap-ui)_ update setup table ([#3724](https://github.com/lunarvim/lunarvim/pull/3724))
+- _(installer)_ list dependencies that will be installed ([#3523](https://github.com/lunarvim/lunarvim/pull/3523))
+- _(installer)_ allow customizing NVIM_APPNAME ([#3896](https://github.com/lunarvim/lunarvim/pull/3896))
+- _(keybindings)_ operator pending mode ([#3626](https://github.com/lunarvim/lunarvim/pull/3626))
+- _(keybindings)_ add code action to visual mode ([#4022](https://github.com/lunarvim/lunarvim/pull/4022))
+- _(lang)_ yaml use schemastore ([#3953](https://github.com/lunarvim/lunarvim/pull/3953))
+- _(lazy)_ lazy.nvim settings can be customized ([#4010](https://github.com/lunarvim/lunarvim/pull/4010))
+- _(lsp)_ focusable line diagnostics ([#3622](https://github.com/lunarvim/lunarvim/pull/3622))
+- _(mason)_ add support for mason-registry ([#3994](https://github.com/lunarvim/lunarvim/pull/3994))
+- _(mason)_ add on_config_done option to lvim.builtin.mason ([#3991](https://github.com/lunarvim/lunarvim/pull/3991))
+- _(reload)_ add all conf files to aupat ([#3644](https://github.com/lunarvim/lunarvim/pull/3644))
+- _(tailwind)_ add .ts options to tailwind.config root_pattern ([#4016](https://github.com/lunarvim/lunarvim/pull/4016))
+- _(telescope)_ add `lvim.builtin.telescope.theme` ([#3548](https://github.com/lunarvim/lunarvim/pull/3548))
+- _(ts)_ enable indent for c and cpp ([#3783](https://github.com/lunarvim/lunarvim/pull/3783))
+- _(which-key)_ keybind for `:Telescope resume` ([#3826](https://github.com/lunarvim/lunarvim/pull/3826))
+- _(wich-key)_ binding to save without formatting ([#3165](https://github.com/lunarvim/lunarvim/pull/3165))
+- add command & keybind to view docs ([#3426](https://github.com/lunarvim/lunarvim/pull/3426))
+- configure dap logging ([#3454](https://github.com/lunarvim/lunarvim/pull/3454))
+- support 'hrsh7th/cmp-cmdline' by default ([#3545](https://github.com/lunarvim/lunarvim/pull/3545))
+- don't prompt smart quit when buffer open in another window ([#3636](https://github.com/lunarvim/lunarvim/pull/3636))
+- use codicons that are available for nerdfonts now ([#3646](https://github.com/lunarvim/lunarvim/pull/3646))
+- update setup tables ([#3693](https://github.com/lunarvim/lunarvim/pull/3693))
+- enable auto preview colorscheme by default ([#3701](https://github.com/lunarvim/lunarvim/pull/3701))
+- cmdline config option enables cmp-cmdline plugin ([#3719](https://github.com/lunarvim/lunarvim/pull/3719))
+- add crystal filetype ([#3762](https://github.com/lunarvim/lunarvim/pull/3762))
+- include git status in LvimVersion ([#3774](https://github.com/lunarvim/lunarvim/pull/3774))
+- regenerate lsp templates after LvimUpdate ([#3864](https://github.com/lunarvim/lunarvim/pull/3864))
+
+### <!-- 2 --> Bugfix
+
+- _(alpha)_ make dashboard responsive ([#3505](https://github.com/lunarvim/lunarvim/pull/3505))
+- _(alpha)_ check height of the aplha window ([#3585](https://github.com/lunarvim/lunarvim/pull/3585))
+- _(alpha)_ rollback to older commit ([#3832](https://github.com/lunarvim/lunarvim/pull/3832))
+- _(autocmds)_ add separate autoreload config group  ([#3436](https://github.com/lunarvim/lunarvim/pull/3436))
+- _(autocmds)_ remove spell autocmd ([#3487](https://github.com/lunarvim/lunarvim/pull/3487))
+- _(autopairs)_ attach confirm_done only once ([#3430](https://github.com/lunarvim/lunarvim/pull/3430))
+- _(bootstrap)_ delay lsp setup until LazyDone ([#4041](https://github.com/lunarvim/lunarvim/pull/4041))
+- _(breadcrumbs)_ `E36 Not enough space` when using dap-ui `Eval` ([#3533](https://github.com/lunarvim/lunarvim/pull/3533))
+- _(breadcrumbs)_ use hlgroup from web devicons in breadcrumbs ([#3342](https://github.com/lunarvim/lunarvim/pull/3342))
+- _(breadcrumbs)_ refresh on TabEnter ([#3727](https://github.com/lunarvim/lunarvim/pull/3727))
+- _(breadcrumbs)_ disable for neotest ([#3921](https://github.com/lunarvim/lunarvim/pull/3921))
+- _(bufferline)_ fallback to empty table if `buf_nums` is nil ([#3473](https://github.com/lunarvim/lunarvim/pull/3473))
+- _(bufkill)_ wrap around correctly ([#3461](https://github.com/lunarvim/lunarvim/pull/3461))
+- _(bufkill)_ wait for user's input ([#3535](https://github.com/lunarvim/lunarvim/pull/3535))
+- _(cmp)_ handle deprecated tree-sitter api ([#3853](https://github.com/lunarvim/lunarvim/pull/3853))
+- _(config)_ use a minimal bootstrap for mason ([#3427](https://github.com/lunarvim/lunarvim/pull/3427))
+- _(config)_ fix typo in example configs ([#3611](https://github.com/lunarvim/lunarvim/pull/3611))
+- _(config)_ copy the correct example config ([#3722](https://github.com/lunarvim/lunarvim/pull/3722))
+- _(config-loader)_ defer invalid configuration warning ([#3869](https://github.com/lunarvim/lunarvim/pull/3869))
+- _(dap)_ invalid border value ([#3951](https://github.com/lunarvim/lunarvim/pull/3951))
+- _(dashboard)_ remove feedkeys ([#3558](https://github.com/lunarvim/lunarvim/pull/3558))
+- _(icons)_ make devicons optional ([#3616](https://github.com/lunarvim/lunarvim/pull/3616))
+- _(indentlines)_ set indent_char to LineLeft ([#3741](https://github.com/lunarvim/lunarvim/pull/3741))
+- _(indentlines)_ typo ([#3743](https://github.com/lunarvim/lunarvim/pull/3743))
+- _(installer)_ fix syntax error with powershell installer ([#2875](https://github.com/lunarvim/lunarvim/pull/2875))
+- _(installer)_ only install treesitter-cli if it's missing ([#3740](https://github.com/lunarvim/lunarvim/pull/3740))
+- _(installer)_ validation step was failing on windows ([#4008](https://github.com/lunarvim/lunarvim/pull/4008))
+- _(lir)_ nil check, simpler logic ([#3725](https://github.com/lunarvim/lunarvim/pull/3725))
+- _(logger)_ fix errors with older structlog versions ([#3755](https://github.com/lunarvim/lunarvim/pull/3755))
+- _(lsp)_ disable annoying popup for sumneko-lua ([#3445](https://github.com/lunarvim/lunarvim/pull/3445))
+- _(lsp)_ some servers have dynamic commands ([#3471](https://github.com/lunarvim/lunarvim/pull/3471))
+- _(lsp)_ sumneko-lua library scanning ([#3484](https://github.com/lunarvim/lunarvim/pull/3484))
+- _(lsp)_ add neocmake to skipped_servers ([#3597](https://github.com/lunarvim/lunarvim/pull/3597))
+- _(lsp)_ don't remove mason-lspconfig's hook ([#3739](https://github.com/lunarvim/lunarvim/pull/3739))
+- _(lsp)_ info diagnostic icon not showing ([#3756](https://github.com/lunarvim/lunarvim/pull/3756))
+- _(lsp)_ lazy loading ([#3824](https://github.com/lunarvim/lunarvim/pull/3824))
+- _(lsp)_ template generation for filetypes with dots ([#3833](https://github.com/lunarvim/lunarvim/pull/3833))
+- _(lsp)_ incorrect `g` goto capitalization ([#3950](https://github.com/lunarvim/lunarvim/pull/3950))
+- _(lsp)_ add luv library by default to lua_ls ([#4067](https://github.com/lunarvim/lunarvim/pull/4067))
+- _(nvim-tree)_ remove deprecated option (nvim-tree/nvim-tree.lua#2122) ([#4033](https://github.com/lunarvim/lunarvim/pull/4033))
+- _(nvimtree)_ avoid hard-coded mapping ([#3492](https://github.com/lunarvim/lunarvim/pull/3492))
+- _(nvimtree)_ don't overwrite update_focused_file.ignore_list ([#3986](https://github.com/lunarvim/lunarvim/pull/3986))
+- _(packer)_ increase clone timeout in headless ([#3470](https://github.com/lunarvim/lunarvim/pull/3470))
+- _(plugin-loader)_ don't clean lazy.nvim in sync_core_plugins ([#3731](https://github.com/lunarvim/lunarvim/pull/3731))
+- _(plugin-loader)_ don't clean plugins on LvimUpdate ([#3747](https://github.com/lunarvim/lunarvim/pull/3747))
+- _(plugin-loader)_ support older git versions ([#3769](https://github.com/lunarvim/lunarvim/pull/3769))
+- _(snapshots)_ correct tokyonight commit sha ([#3620](https://github.com/lunarvim/lunarvim/pull/3620))
+- _(telescope)_ backwards compability ([#3596](https://github.com/lunarvim/lunarvim/pull/3596))
+- _(terminal)_ use user's shell in execs ([#3531](https://github.com/lunarvim/lunarvim/pull/3531))
+- _(terminal)_ don't set the shell by default ([#3867](https://github.com/lunarvim/lunarvim/pull/3867))
+- _(tree-sitter)_ force update bundled parsers ([#3475](https://github.com/lunarvim/lunarvim/pull/3475))
+- _(treesitter)_ prepend to rtp ([#3708](https://github.com/lunarvim/lunarvim/pull/3708))
+- _(ts)_ disable indent for c and cpp ([#3687](https://github.com/lunarvim/lunarvim/pull/3687))
+- _(uninstaller)_ add separate flag to remove user config ([#3508](https://github.com/lunarvim/lunarvim/pull/3508))
+- _(uninstaller)_ correct a sentence in help ([#3511](https://github.com/lunarvim/lunarvim/pull/3511))
+- _(which-key)_ typo ([#3963](https://github.com/lunarvim/lunarvim/pull/3963))
+- add dap-ui config to lvim.builtin.dap ([#3386](https://github.com/lunarvim/lunarvim/pull/3386))
+- cmp will behave closer to how people expect
+- discard invalid choice when closing buffers ([#3488](https://github.com/lunarvim/lunarvim/pull/3488))
+- startify theme button bugfix ([#3557](https://github.com/lunarvim/lunarvim/pull/3557))
+- only call theme's setup if it's selected ([#3586](https://github.com/lunarvim/lunarvim/pull/3586))
+- bash installer errors ([#3686](https://github.com/lunarvim/lunarvim/pull/3686))
+- remove deprecated nvim-tree options ([#3810](https://github.com/lunarvim/lunarvim/pull/3810))
+- win installer syntax error ([#3635](https://github.com/lunarvim/lunarvim/pull/3635))
+- lazy cache ([#3892](https://github.com/lunarvim/lunarvim/pull/3892))
+- copilot indent reset ([#3343](https://github.com/lunarvim/lunarvim/pull/3343)) ([#3960](https://github.com/lunarvim/lunarvim/pull/3960))
+- typo ([#4023](https://github.com/lunarvim/lunarvim/pull/4023))
+- use `require` instead of `reload` in pcalls  ([#4038](https://github.com/lunarvim/lunarvim/pull/4038))
+- make FileOpened autocmd work with quickfix ([#4040](https://github.com/lunarvim/lunarvim/pull/4040))
+
+### <!-- 3 --> Refactor
+
+- _(alpha)_ remove laststatus and tabline autocmds ([#3809](https://github.com/lunarvim/lunarvim/pull/3809))
+- _(autocmds)_ clean up filetype detection rules ([#3625](https://github.com/lunarvim/lunarvim/pull/3625))
+- _(logger)_ adapt to new changes upstream ([#3695](https://github.com/lunarvim/lunarvim/pull/3695))
+- [**breaking**] _(quit)_ use native quit confirm ([#3721](https://github.com/lunarvim/lunarvim/pull/3721))
+- [**breaking**] _(treesitter)_ use auto-install by default ([#3677](https://github.com/lunarvim/lunarvim/pull/3677))
+- move dap keybindings to which key  ([#3459](https://github.com/lunarvim/lunarvim/pull/3459))
+- simplify example config ([#3519](https://github.com/lunarvim/lunarvim/pull/3519))
+- use lir fork in the org ([#3694](https://github.com/lunarvim/lunarvim/pull/3694))
+- move to upstream lir ([#3711](https://github.com/lunarvim/lunarvim/pull/3711))
+- [**breaking**] remove `%` and `$` autopairs rules ([#3759](https://github.com/lunarvim/lunarvim/pull/3759))
+
+### <!-- 4 --> Documentation
+
+- _(contributing)_ make it clear how to title PRs ([#3463](https://github.com/lunarvim/lunarvim/pull/3463))
+- _(ts)_ add hint about `ensure_installed` ([#3827](https://github.com/lunarvim/lunarvim/pull/3827))
+- github pull request template update ([#3512](https://github.com/lunarvim/lunarvim/pull/3512))
+
+### <!-- 6 --> Performance
+
+- _(toggleterm)_ on-demand lazy load ([#3811](https://github.com/lunarvim/lunarvim/pull/3811))
+- handle big files better ([#3449](https://github.com/lunarvim/lunarvim/pull/3449))
+- lazy load most plugins ([#3750](https://github.com/lunarvim/lunarvim/pull/3750))
+
 ## [1.2.0]
 
 ### <!-- 1 --> Features

+ 1 - 1
CONTRIBUTING.md

@@ -12,7 +12,7 @@ One of the best ways to begin contributing in a meaningful way is by helping fin
 
 1. Follow the [Installation](https://www.lunarvim.org/docs/installation) guide
 2. Link your fork with the repository `git remote add upstream https://github.com/lunarvim/LunarVim.git`, or use `gh fork`
-3. That's it! You can now `git fetch upstream` and `git rebase [-i] upstream/rolling` to update your branches with the latest contributions.
+3. That's it! You can now `git fetch upstream` and `git rebase [-i] upstream/master` to update your branches with the latest contributions.
 
 <br />
 

+ 21 - 0
lua/lvim/config/_deprecated.lua

@@ -53,12 +53,33 @@ function M.handle()
   lvim.lsp.popup_border = {}
   setmetatable(lvim.lsp.popup_border, mt)
 
+  ---@deprecated
+  lvim.lsp.float = {}
+  setmetatable(lvim.lsp.float, {
+    __newindex = function(_, k, _)
+      deprecate("lvim.lsp.float." .. k, "Use options provided by the handler instead")
+    end,
+  })
+
+  ---@deprecated
+  lvim.lsp.diagnostics = {}
+  setmetatable(lvim.lsp.diagnostics, {
+    __newindex = function(table, k, v)
+      deprecate("lvim.lsp.diagnostics." .. k, string.format("Use `vim.diagnostic.config({ %s = %s })` instead", k, v))
+      rawset(table, k, v)
+    end,
+  })
+
   ---@deprecated
   lvim.lang = {}
   setmetatable(lvim.lang, mt)
 end
 
 function M.post_load()
+  if lvim.lsp.diagnostics and not vim.tbl_isempty(lvim.lsp.diagnostics) then
+    vim.diagnostic.config(lvim.lsp.diagnostics)
+  end
+
   if lvim.lsp.override and not vim.tbl_isempty(lvim.lsp.override) then
     deprecate("lvim.lsp.override", "Use `lvim.lsp.automatic_configuration.skipped_servers` instead")
     vim.tbl_map(function(c)

+ 26 - 0
lua/lvim/config/settings.lua

@@ -74,6 +74,32 @@ M.load_default_options = function()
       ["[jt]sconfig.*.json"] = "jsonc",
     },
   }
+
+  local default_diagnostic_config = {
+    signs = {
+      active = true,
+      values = {
+        { name = "DiagnosticSignError", text = lvim.icons.diagnostics.Error },
+        { name = "DiagnosticSignWarn", text = lvim.icons.diagnostics.Warning },
+        { name = "DiagnosticSignHint", text = lvim.icons.diagnostics.Hint },
+        { name = "DiagnosticSignInfo", text = lvim.icons.diagnostics.Information },
+      },
+    },
+    virtual_text = true,
+    update_in_insert = false,
+    underline = true,
+    severity_sort = true,
+    float = {
+      focusable = true,
+      style = "minimal",
+      border = "rounded",
+      source = "always",
+      header = "",
+      prefix = "",
+    },
+  }
+
+  vim.diagnostic.config(default_diagnostic_config)
 end
 
 M.load_headless_options = function()

+ 1 - 1
lua/lvim/core/commands.lua

@@ -32,7 +32,7 @@ M.defaults = {
   {
     name = "LvimDocs",
     fn = function()
-      local documentation_url = "https://www.lunarvim.org/docs/quick-start"
+      local documentation_url = "https://www.lunarvim.org/docs/beginners-guide"
       if vim.fn.has "mac" == 1 or vim.fn.has "macunix" == 1 then
         vim.fn.execute("!open " .. documentation_url)
       elseif vim.fn.has "win32" == 1 or vim.fn.has "win64" == 1 then

+ 45 - 39
lua/lvim/core/nvimtree.lua

@@ -17,7 +17,7 @@ function M.config()
       sync_root_with_cwd = true,
       reload_on_bufenter = false,
       respect_buf_cwd = false,
-      on_attach = "disable",
+      on_attach = "default",
       remove_keymaps = false,
       select_prompts = false,
       view = {
@@ -30,10 +30,6 @@ function M.config()
         number = false,
         relativenumber = false,
         signcolumn = "yes",
-        mappings = {
-          custom_only = false,
-          list = {},
-        },
         float = {
           enable = false,
           quit_on_focus_loss = true,
@@ -226,20 +222,55 @@ function M.config()
   }
 end
 
+function M.start_telescope(telescope_mode)
+  local node = require("nvim-tree.lib").get_node_at_cursor()
+  local abspath = node.link_to or node.absolute_path
+  local is_folder = node.open ~= nil
+  local basedir = is_folder and abspath or vim.fn.fnamemodify(abspath, ":h")
+  require("telescope.builtin")[telescope_mode] {
+    cwd = basedir,
+  }
+end
+
+local function on_attach(bufnr)
+  local api = require "nvim-tree.api"
+
+  local function telescope_find_files(_)
+    require("lvim.core.nvimtree").start_telescope "find_files"
+  end
+
+  local function telescope_live_grep(_)
+    require("lvim.core.nvimtree").start_telescope "live_grep"
+  end
+
+  local function opts(desc)
+    return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
+  end
+
+  api.config.mappings.default_on_attach(bufnr)
+
+  local useful_keys = {
+    ["l"] = { api.node.open.edit, opts "Open" },
+    ["o"] = { api.node.open.edit, opts "Open" },
+    ["<CR>"] = { api.node.open.edit, opts "Open" },
+    ["v"] = { api.node.open.vertical, opts "Open: Vertical Split" },
+    ["h"] = { api.node.navigate.parent_close, opts "Close Directory" },
+    ["C"] = { api.tree.change_root_to_node, opts "CD" },
+    ["gtg"] = { telescope_live_grep, opts "Telescope Live Grep" },
+    ["gtf"] = { telescope_find_files, opts "Telescope Find File" },
+  }
+
+  require("lvim.keymappings").load_mode("n", useful_keys)
+end
+
 function M.setup()
   local status_ok, nvim_tree = pcall(require, "nvim-tree")
+
   if not status_ok then
     Log:error "Failed to load nvim-tree"
     return
   end
 
-  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.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
@@ -248,24 +279,9 @@ function M.setup()
     lvim.builtin.nvimtree.setup.update_focused_file.update_cwd = true
   end
 
-  local function telescope_find_files(_)
-    require("lvim.core.nvimtree").start_telescope "find_files"
-  end
-
-  local function telescope_live_grep(_)
-    require("lvim.core.nvimtree").start_telescope "live_grep"
-  end
-
   -- Add useful keymaps
-  if #lvim.builtin.nvimtree.setup.view.mappings.list == 0 then
-    lvim.builtin.nvimtree.setup.view.mappings.list = {
-      { key = { "l", "<CR>", "o" }, action = "edit", mode = "n" },
-      { key = "h", action = "close_node" },
-      { key = "v", action = "vsplit" },
-      { key = "C", action = "cd" },
-      { key = "gtf", action = "telescope_find_files", action_cb = telescope_find_files },
-      { key = "gtg", action = "telescope_live_grep", action_cb = telescope_live_grep },
-    }
+  if lvim.builtin.nvimtree.setup.on_attach == "default" then
+    lvim.builtin.nvimtree.setup.on_attach = on_attach
   end
 
   nvim_tree.setup(lvim.builtin.nvimtree.setup)
@@ -275,14 +291,4 @@ function M.setup()
   end
 end
 
-function M.start_telescope(telescope_mode)
-  local node = require("nvim-tree.lib").get_node_at_cursor()
-  local abspath = node.link_to or node.absolute_path
-  local is_folder = node.open ~= nil
-  local basedir = is_folder and abspath or vim.fn.fnamemodify(abspath, ":h")
-  require("telescope.builtin")[telescope_mode] {
-    cwd = basedir,
-  }
-end
-
 return M

+ 15 - 39
lua/lvim/lsp/config.lua

@@ -2,8 +2,9 @@ local skipped_servers = {
   "angularls",
   "ansiblels",
   "antlersls",
+  "azure_pipelines_ls",
   "ccls",
-  "csharp_ls",
+  "omnisharp",
   "cssmodules_ls",
   "denols",
   "docker_compose_language_service",
@@ -15,6 +16,7 @@ local skipped_servers = {
   "golangci_lint_ls",
   "gradle_ls",
   "graphql",
+  "java_language_server",
   "jedi_language_server",
   "ltex",
   "neocmake",
@@ -22,6 +24,7 @@ local skipped_servers = {
   "phpactor",
   "psalm",
   "pylsp",
+  "pylyzer",
   "pyre",
   "quick_lint_js",
   "reason_ls",
@@ -39,6 +42,7 @@ local skipped_servers = {
   "spectral",
   "sqlls",
   "sqls",
+  "standardrb",
   "stylelint_lsp",
   "svlangserver",
   "tflint",
@@ -54,43 +58,10 @@ local join_paths = require("lvim.utils").join_paths
 
 return {
   templates_dir = join_paths(get_runtime_dir(), "site", "after", "ftplugin"),
-  diagnostics = {
-    signs = {
-      active = true,
-      values = {
-        { name = "DiagnosticSignError", text = lvim.icons.diagnostics.Error },
-        { name = "DiagnosticSignWarn", text = lvim.icons.diagnostics.Warning },
-        { name = "DiagnosticSignHint", text = lvim.icons.diagnostics.Hint },
-        { name = "DiagnosticSignInfo", text = lvim.icons.diagnostics.Information },
-      },
-    },
-    virtual_text = true,
-    update_in_insert = false,
-    underline = true,
-    severity_sort = true,
-    float = {
-      focusable = true,
-      style = "minimal",
-      border = "rounded",
-      source = "always",
-      header = "",
-      prefix = "",
-      format = function(d)
-        local code = d.code or (d.user_data and d.user_data.lsp.code)
-        if code then
-          return string.format("%s [%s]", d.message, code):gsub("1. ", "")
-        end
-        return d.message
-      end,
-    },
-  },
+  ---@deprecated use vim.diagnostic.config({ ... }) instead
+  diagnostics = {},
   document_highlight = false,
   code_lens_refresh = true,
-  float = {
-    focusable = true,
-    style = "minimal",
-    border = "rounded",
-  },
   on_attach_callback = nil,
   on_init_callback = nil,
   automatic_configuration = {
@@ -109,9 +80,14 @@ return {
       ["gs"] = { "<cmd>lua vim.lsp.buf.signature_help()<cr>", "show signature help" },
       ["gl"] = {
         function()
-          local config = lvim.lsp.diagnostics.float
-          config.scope = "line"
-          vim.diagnostic.open_float(0, config)
+          local float = vim.diagnostic.config().float
+
+          if float then
+            local config = type(float) == "table" and float or {}
+            config.scope = "line"
+
+            vim.diagnostic.open_float(config)
+          end
         end,
         "Show line diagnostics",
       },

+ 0 - 19
lua/lvim/lsp/handlers.lua

@@ -1,19 +0,0 @@
--- Set Default Prefix.
--- Note: You can set a prefix per lsp server in the lv-globals.lua file
-local M = {}
-
-function M.setup()
-  local config = { -- your config
-    virtual_text = lvim.lsp.diagnostics.virtual_text,
-    signs = lvim.lsp.diagnostics.signs,
-    underline = lvim.lsp.diagnostics.underline,
-    update_in_insert = lvim.lsp.diagnostics.update_in_insert,
-    severity_sort = lvim.lsp.diagnostics.severity_sort,
-    float = lvim.lsp.diagnostics.float,
-  }
-  vim.diagnostic.config(config)
-  vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, lvim.lsp.float)
-  vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, lvim.lsp.float)
-end
-
-return M

+ 1 - 3
lua/lvim/lsp/init.lua

@@ -95,13 +95,11 @@ function M.setup()
   end
 
   if lvim.use_icons then
-    for _, sign in ipairs(lvim.lsp.diagnostics.signs.values) do
+    for _, sign in ipairs(vim.tbl_get(vim.diagnostic.config(), "signs", "values") or {}) do
       vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = sign.name })
     end
   end
 
-  require("lvim.lsp.handlers").setup()
-
   if not utils.is_directory(lvim.lsp.templates_dir) then
     require("lvim.lsp.templates").generate_templates()
   end

+ 1 - 0
lua/lvim/lsp/utils.lua

@@ -55,6 +55,7 @@ end
 ---@param filter { filetype: string | string[] }?: (optional) Used to filter the list of server names.
 ---@return string[] list of names of supported servers
 function M.get_supported_servers(filter)
+  require("mason-registry").refresh()
   local _, supported_servers = pcall(function()
     return require("mason-lspconfig").get_available_servers(filter)
   end)

+ 5 - 0
lua/lvim/plugins.lua

@@ -17,6 +17,7 @@ local core_plugins = {
       settings.current.automatic_installation = false
     end,
     lazy = true,
+    event = "User FileOpened",
     dependencies = "mason.nvim",
   },
   { "tamago324/nlsp-settings.nvim", cmd = "LspSettings", lazy = true },
@@ -32,6 +33,7 @@ local core_plugins = {
         require("mason-registry").refresh()
       end)
     end,
+    event = "User FileOpened",
     lazy = true,
   },
   {
@@ -258,6 +260,9 @@ local core_plugins = {
       require("lvim.core.dap").setup()
     end,
     lazy = true,
+    dependencies = {
+      "rcarriga/nvim-dap-ui",
+    },
     enabled = lvim.builtin.dap.active,
   },
 

+ 25 - 25
snapshots/default.json

@@ -1,24 +1,24 @@
 {
   "Comment.nvim": {
-    "commit": "a89339f"
+    "commit": "38d3b7e"
   },
   "LuaSnip": {
-    "commit": "a6355b1"
+    "commit": "e77fa9a"
   },
   "alpha-nvim": {
-    "commit": "dafa11a"
+    "commit": "87c2040"
   },
   "bigfile.nvim": {
     "commit": "c1bad34"
   },
   "bufferline.nvim": {
-    "commit": "243893b"
+    "commit": "a4bd445"
   },
   "cmp-buffer": {
     "commit": "3022dbc"
   },
   "cmp-cmdline": {
-    "commit": "af88e70"
+    "commit": "5af1bb7"
   },
   "cmp-nvim-lsp": {
     "commit": "0e6b2ed"
@@ -30,16 +30,16 @@
     "commit": "1809552"
   },
   "friendly-snippets": {
-    "commit": "b1b78a6"
+    "commit": "631f79e"
   },
   "gitsigns.nvim": {
-    "commit": "372d5cb"
+    "commit": "e5edefd"
   },
   "indent-blankline.nvim": {
     "commit": "018bd04"
   },
   "lazy.nvim": {
-    "commit": "eddee83"
+    "commit": "d6a782c"
   },
   "lir.nvim": {
     "commit": "1aa871f"
@@ -51,46 +51,46 @@
     "commit": "08bbc93"
   },
   "mason-lspconfig.nvim": {
-    "commit": "6c8f7af"
+    "commit": "7276fff"
   },
   "mason.nvim": {
-    "commit": "a1e01f3"
+    "commit": "057ac5c"
   },
   "neodev.nvim": {
-    "commit": "ac2747f"
+    "commit": "0043cf9"
   },
   "nlsp-settings.nvim": {
-    "commit": "41a855c"
+    "commit": "32aa12d"
   },
   "null-ls.nvim": {
-    "commit": "f8ffcd7"
+    "commit": "33b853a"
   },
   "nvim-autopairs": {
-    "commit": "58985de"
+    "commit": "7566a86"
   },
   "nvim-cmp": {
-    "commit": "777450f"
+    "commit": "11102d3"
   },
   "nvim-dap": {
-    "commit": "debd7c2"
+    "commit": "6cedcb5"
   },
   "nvim-dap-ui": {
     "commit": "286f682"
   },
   "nvim-lspconfig": {
-    "commit": "eddaef9"
+    "commit": "427378a"
   },
   "nvim-navic": {
-    "commit": "226c1c0"
+    "commit": "83dc174"
   },
   "nvim-tree.lua": {
-    "commit": "8f392fa"
+    "commit": "bb375fb"
   },
   "nvim-treesitter": {
-    "commit": "351e43d"
+    "commit": "2ce3c90"
   },
   "nvim-ts-context-commentstring": {
-    "commit": "ada15e9"
+    "commit": "0bf8fbc"
   },
   "nvim-web-devicons": {
     "commit": "4ec26d6"
@@ -105,7 +105,7 @@
     "commit": "8c6bad7"
   },
   "schemastore.nvim": {
-    "commit": "a592fbe"
+    "commit": "0b396f5"
   },
   "structlog.nvim": {
     "commit": "45b26a2"
@@ -117,15 +117,15 @@
     "commit": "9de317b"
   },
   "toggleterm.nvim": {
-    "commit": "1c5996e"
+    "commit": "68fdf85"
   },
   "tokyonight.nvim": {
-    "commit": "ef8f591"
+    "commit": "c5df636"
   },
   "vim-illuminate": {
     "commit": "a290727"
   },
   "which-key.nvim": {
-    "commit": "20fcd7b"
+    "commit": "4acffc9"
   }
 }

+ 5 - 4
tests/specs/lsp_spec.lua

@@ -21,6 +21,9 @@ a.describe("lsp workflow", function()
   end)
 
   lvim.lsp.templates_dir = join_paths(get_cache_dir(), "artifacts")
+  vim.go.loadplugins = true
+  local plugins = require "lvim.plugins"
+  require("lvim.plugin-loader").load { plugins, lvim.plugins }
 
   a.it("should be able to delete ftplugin templates", function()
     if utils.is_directory(lvim.lsp.templates_dir) then
@@ -36,14 +39,14 @@ a.describe("lsp workflow", function()
 
     require("lvim.lsp").setup()
 
-    assert.True(utils.is_directory(lvim.lsp.templates_dir))
+    assert.True(#vim.fn.glob(lvim.lsp.templates_dir .. "/*.lua", 1, 1) > 0)
   end)
 
   a.it("should not include blacklisted servers in the generated templates", function()
     require("lvim.lsp").setup()
 
     for _, file in ipairs(vim.fn.glob(lvim.lsp.templates_dir .. "/*.lua", 1, 1)) do
-      for _, server_name in ipairs(lvim.lsp.override) do
+      for _, server_name in ipairs(lvim.lsp.automatic_configuration.skipped_servers) do
         local setup_cmd = string.format([[require("lvim.lsp.manager").setup(%q)]], server_name)
         assert.False(helpers.file_contains(file, setup_cmd))
       end
@@ -76,8 +79,6 @@ a.describe("lsp workflow", function()
 
   a.it("should not attempt to re-generate ftplugin templates", function()
     local s = spy.on(require "lvim.lsp.templates", "generate_templates")
-    local plugins = require "lvim.plugins"
-    require("lvim.plugin-loader").load { plugins, lvim.plugins }
 
     require("lvim.lsp").setup()
     assert.spy(s).was_not_called()

+ 3 - 3
utils/installer/config.example.lua

@@ -47,7 +47,7 @@ lvim.builtin.treesitter.auto_install = true
 -- -- always installed on startup, useful for parsers without a strict filetype
 -- lvim.builtin.treesitter.ensure_installed = { "comment", "markdown_inline", "regex" }
 
--- -- generic LSP settings <https://www.lunarvim.org/docs/languages#lsp-support>
+-- -- generic LSP settings <https://www.lunarvim.org/docs/configuration/language-features/language-servers>
 
 -- --- disable automatic installation of servers
 -- lvim.lsp.installer.setup.automatic_installation = false
@@ -74,7 +74,7 @@ lvim.builtin.treesitter.auto_install = true
 --   buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
 -- end
 
--- -- linters, formatters and code actions <https://www.lunarvim.org/docs/languages#lintingformatting>
+-- -- linters, formatters and code actions <https://www.lunarvim.org/docs/configuration/language-features/linting-and-formatting>
 -- local formatters = require "lvim.lsp.null-ls.formatters"
 -- formatters.setup {
 --   { command = "stylua" },
@@ -100,7 +100,7 @@ lvim.builtin.treesitter.auto_install = true
 --   },
 -- }
 
--- -- Additional Plugins <https://www.lunarvim.org/docs/plugins#user-plugins>
+-- -- Additional Plugins <https://www.lunarvim.org/docs/configuration/plugins/user-plugins>
 -- lvim.plugins = {
 --     {
 --       "folke/trouble.nvim",

+ 3 - 3
utils/installer/config_win.example.lua

@@ -69,7 +69,7 @@ lvim.builtin.treesitter.auto_install = true
 -- -- ensure these parsers are always installed, useful for those without a strict filetype
 -- lvim.builtin.treesitter.ensure_installed = { "comment", "markdown_inline", "regex" }
 
--- -- generic LSP settings <https://www.lunarvim.org/docs/languages#lsp-support>
+-- -- generic LSP settings <https://www.lunarvim.org/docs/configuration/language-features/language-servers>
 
 -- --- disable automatic installation of servers
 -- lvim.lsp.installer.setup.automatic_installation = false
@@ -96,7 +96,7 @@ lvim.builtin.treesitter.auto_install = true
 --   buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
 -- end
 
--- -- linters and formatters <https://www.lunarvim.org/docs/languages#lintingformatting>
+-- -- linters, formatters and code actions <https://www.lunarvim.org/docs/configuration/language-features/linting-and-formatting>
 -- local formatters = require "lvim.lsp.null-ls.formatters"
 -- formatters.setup {
 --   { command = "stylua" },
@@ -115,7 +115,7 @@ lvim.builtin.treesitter.auto_install = true
 --   },
 -- }
 
--- -- Additional Plugins <https://www.lunarvim.org/docs/plugins#user-plugins>
+-- -- Additional Plugins <https://www.lunarvim.org/docs/configuration/plugins/user-plugins>
 -- lvim.plugins = {
 --     {
 --       "folke/trouble.nvim",

+ 1 - 1
utils/installer/install.sh

@@ -439,7 +439,7 @@ function setup_lvim() {
 
   "$INSTALL_PREFIX/bin/$NVIM_APPNAME" --headless -c 'quitall'
 
-  echo "Lazy setup complete"
+  printf "\nLazy setup complete"
 
   verify_core_plugins
 }