summaryrefslogtreecommitdiff
path: root/lua/lvim
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2022-09-12 18:41:25 +0200
committerGitHub <[email protected]>2022-09-12 18:41:25 +0200
commit7535f4eff9ca70dfe73db4a099d509590aa07ade (patch)
treea7b660de5ec874271f1174f7834eb7576eb8d12f /lua/lvim
parent2519e07423e2f6ce4cbed6483305dcaa5bbabf4e (diff)
fix(plugins): handle deprecated options (#3014)
Diffstat (limited to 'lua/lvim')
-rw-r--r--lua/lvim/core/bufferline.lua16
-rw-r--r--lua/lvim/lsp/providers/sumneko_lua.lua34
2 files changed, 29 insertions, 21 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