diff options
| author | kylo252 <[email protected]> | 2022-09-12 18:41:25 +0200 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2022-09-12 18:41:25 +0200 | 
| commit | 7535f4eff9ca70dfe73db4a099d509590aa07ade (patch) | |
| tree | a7b660de5ec874271f1174f7834eb7576eb8d12f | |
| parent | 2519e07423e2f6ce4cbed6483305dcaa5bbabf4e (diff) | |
fix(plugins): handle deprecated options (#3014)
| -rw-r--r-- | lua/lvim/core/bufferline.lua | 16 | ||||
| -rw-r--r-- | lua/lvim/lsp/providers/sumneko_lua.lua | 34 | ||||
| -rw-r--r-- | snapshots/default.json | 46 | ||||
| -rw-r--r-- | utils/ci/verify_plugins.lua | 4 | 
4 files changed, 54 insertions, 46 deletions
| diff --git a/lua/lvim/core/bufferline.lua b/lua/lvim/core/bufferline.lua index 7e8f1376..36e5ff54 100644 --- a/lua/lvim/core/bufferline.lua +++ b/lua/lvim/core/bufferline.lua @@ -52,15 +52,16 @@ M.config = function()        },      },      options = { +      mode = "buffers", -- set to "tabs" to only show tabpages instead        numbers = "none", -- can be "none" | "ordinal" | "buffer_id" | "both" | function        close_command = "bdelete! %d", -- can be a string | function, see "Mouse actions"        right_mouse_command = "vert sbuffer %d", -- can be a string | function, see "Mouse actions"        left_mouse_command = "buffer %d", -- can be a string | function, see "Mouse actions"        middle_mouse_command = nil, -- can be a string | function, see "Mouse actions" -      -- NOTE: this plugin is designed with this icon in mind, -      -- and so changing this is NOT recommended, this is intended -      -- as an escape hatch for people who cannot bear it for whatever reason -      indicator_icon = "▎", +      indicator = { +        icon = "▎", -- this should be omitted if indicator style is not 'icon' +        style = "icon", -- can also be 'underline'|'none', +      },        buffer_close_icon = "",        modified_icon = "●",        close_icon = "", @@ -78,6 +79,7 @@ M.config = function()        end,        max_name_length = 18,        max_prefix_length = 15, -- prefix used when a buffer is de-duplicated +      truncate_names = true, -- whether or not tab names should be truncated        tab_size = 18,        diagnostics = "nvim_lsp",        diagnostics_update_in_insert = false, @@ -115,6 +117,7 @@ M.config = function()            padding = 1,          },        }, +      color_icons = true, -- whether or not to add the filetype icon highlights        show_buffer_icons = lvim.use_icons, -- disable filetype icons for buffers        show_buffer_close_icons = lvim.use_icons,        show_close_icon = false, @@ -125,6 +128,11 @@ M.config = function()        separator_style = "thin",        enforce_regular_tabs = false,        always_show_bufferline = false, +      hover = { +        enabled = false, -- requires nvim 0.8+ +        delay = 200, +        reveal = { "close" }, +      },        sort_by = "id",      },    } diff --git a/lua/lvim/lsp/providers/sumneko_lua.lua b/lua/lvim/lsp/providers/sumneko_lua.lua index fa0d2d31..6cd78157 100644 --- a/lua/lvim/lsp/providers/sumneko_lua.lua +++ b/lua/lvim/lsp/providers/sumneko_lua.lua @@ -1,3 +1,19 @@ +local dev_opts = { +  library = { +    vimruntime = true, -- runtime path +    types = true, -- full signature, docs and completion of vim.api, vim.treesitter, vim.lsp and others +    -- plugins = true, -- installed opt or start plugins in packpath +    -- you can also specify the list of plugins to make available as a workspace library +    plugins = { "plenary.nvim" }, +  }, +  override = nil, -- function(root_dir, options) end, +} + +local lua_dev_loaded, lua_dev = pcall(require, "lua-dev") +if lua_dev_loaded then +  lua_dev.setup(dev_opts) +end +  local opts = {    settings = {      Lua = { @@ -15,20 +31,4 @@ local opts = {    },  } -local lua_dev_loaded, lua_dev = pcall(require, "lua-dev") -if not lua_dev_loaded then -  return opts -end - -local dev_opts = { -  library = { -    vimruntime = true, -- runtime path -    types = true, -- full signature, docs and completion of vim.api, vim.treesitter, vim.lsp and others -    -- plugins = true, -- installed opt or start plugins in packpath -    -- you can also specify the list of plugins to make available as a workspace library -    plugins = { "plenary.nvim" }, -  }, -  lspconfig = opts, -} - -return lua_dev.setup(dev_opts) +return opts diff --git a/snapshots/default.json b/snapshots/default.json index a5c9cff1..b57c4fba 100644 --- a/snapshots/default.json +++ b/snapshots/default.json @@ -6,13 +6,13 @@      "commit": "5aa5ff1"    },    "LuaSnip": { -    "commit": "a45cd5f" +    "commit": "6e506ce"    },    "alpha-nvim": { -    "commit": "09e5374" +    "commit": "0bb6fc0"    },    "bufferline.nvim": { -    "commit": "0b4b863" +    "commit": "ffa1d00"    },    "cmp-buffer": {      "commit": "3022dbc" @@ -30,49 +30,49 @@      "commit": "3679132"    },    "friendly-snippets": { -    "commit": "e5a16f9" +    "commit": "22a9975"    },    "gitsigns.nvim": {      "commit": "d7e0bcb"    },    "lua-dev.nvim": { -    "commit": "9381ad0" +    "commit": "fd7a18e"    },    "lualine.nvim": { -    "commit": "3cf4540" +    "commit": "a52f078"    },    "mason-lspconfig.nvim": { -    "commit": "328eb72" +    "commit": "1534b61"    },    "mason.nvim": { -    "commit": "f1cb597" +    "commit": "b56ea0b"    },    "nlsp-settings.nvim": { -    "commit": "633feef" +    "commit": "e1fcc6e"    },    "null-ls.nvim": { -    "commit": "7cd491b" +    "commit": "bf02782"    },    "nvim-autopairs": { -    "commit": "0a18e10" +    "commit": "5fe2441"    },    "nvim-cmp": { -    "commit": "33fbb2c" +    "commit": "913eb85"    },    "nvim-dap": { -    "commit": "ea25d6d" +    "commit": "d9b315a"    },    "nvim-lspconfig": { -    "commit": "0fafc3e" +    "commit": "f8b3c24"    },    "nvim-notify": { -    "commit": "6b779c9" +    "commit": "7076ce8"    },    "nvim-tree.lua": { -    "commit": "951e10a" +    "commit": "fb8735e"    },    "nvim-treesitter": { -    "commit": "1506334" +    "commit": "2eaf188"    },    "nvim-ts-context-commentstring": {      "commit": "4d3a68c" @@ -84,7 +84,7 @@      "commit": "b00dd21"    },    "packer.nvim": { -    "commit": "537669b" +    "commit": "6afb674"    },    "plenary.nvim": {      "commit": "4b66054" @@ -96,21 +96,21 @@      "commit": "090bb11"    },    "schemastore.nvim": { -    "commit": "e729173" +    "commit": "92efc7c"    },    "structlog.nvim": {      "commit": "232a8e2"    },    "telescope-fzf-native.nvim": { -    "commit": "6791f74" +    "commit": "65c0ee3"    },    "telescope.nvim": { -    "commit": "8dce937" +    "commit": "0b1c41a"    },    "toggleterm.nvim": { -    "commit": "7abb25e" +    "commit": "5e393e5"    },    "which-key.nvim": { -    "commit": "439637d" +    "commit": "d5f0c63"    }  } diff --git a/utils/ci/verify_plugins.lua b/utils/ci/verify_plugins.lua index c56d85d1..3cc5dd82 100644 --- a/utils/ci/verify_plugins.lua +++ b/utils/ci/verify_plugins.lua @@ -112,7 +112,7 @@ local function verify_core_plugins(verbose)            io.write(fmt("verified [%s]\n", entry.name))          end        end -      local current_commit = result:gsub("\n", ""):gsub([[']], [[]]) +      local current_commit = result:gsub("\n", ""):gsub([[']], [[]]):sub(1, 7)        -- just in case there are some extra qutoes or it's a longer commit hash        if current_commit ~= entry.commit then          io.write(fmt("mismatch at [%s]: expected [%s], got [%s]\n", entry.name, entry.commit, current_commit)) @@ -120,7 +120,7 @@ local function verify_core_plugins(verbose)        end      end -    local handle = call_proc("git", { args = { "log", "--pretty='%h'", "-1" }, cwd = entry.path }, on_done) +    local handle = call_proc("git", { args = { "rev-parse", "--short", "HEAD" }, cwd = entry.path }, on_done)      assert(handle)      table.insert(active_jobs, handle)    end | 
