mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 18:27:34 +00:00
Fix <0.8 after update
This commit is contained in:
parent
61171df4a8
commit
68d61b1d0b
@ -21,9 +21,7 @@ function M.config_lsp_ui()
|
||||
end
|
||||
|
||||
-- Diagnostics signs
|
||||
local signs = utils.diagnostic_signs
|
||||
|
||||
for type, icon in pairs(signs) do
|
||||
for type, icon in pairs(utils.diagnostic_signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||
end
|
||||
@ -85,7 +83,7 @@ local function get_default_attach(override_capabilities)
|
||||
|
||||
-- Set built in features to use lsp functions (automatic in nvim-0.8)
|
||||
-- HACK: Support for <0.8
|
||||
if not vim.fn.has("nvim-0.8") then
|
||||
if vim.fn.has("nvim-0.8") ~= 1 then
|
||||
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
|
||||
if server_capabilities.documentSymbolProvider then
|
||||
buf_set_option("tagfunc", "v:lua.vim.lsp.tagfunc")
|
||||
@ -146,7 +144,7 @@ local function get_default_attach(override_capabilities)
|
||||
|
||||
-- Set some keybinds conditional on server capabilities
|
||||
-- HACK: Support for <0.8
|
||||
if vim.fn.has("nvim-0.8") then
|
||||
if vim.fn.has("nvim-0.8") == 1 then
|
||||
buf_set_keymap("n", "<leader>lf", "<cmd>lua vim.lsp.buf.format({async=true})<CR>", opts)
|
||||
buf_set_keymap("v", "<leader>lf", "<cmd>lua vim.lsp.buf.format({async=true})<CR>", opts)
|
||||
if server_capabilities.documentFormattingProvider then
|
||||
|
@ -68,7 +68,7 @@ function M.configure(options)
|
||||
}
|
||||
|
||||
-- HACK: Support for <0.6
|
||||
if vim.fn.has("nvim-0.6.0") then
|
||||
if vim.fn.has("nvim-0.6.0") == 1 then
|
||||
vim.list_extend(sources, {
|
||||
-- Text
|
||||
null_ls.builtins.diagnostics.alex,
|
||||
|
Loading…
Reference in New Issue
Block a user