mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 23: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
|
end
|
||||||
|
|
||||||
-- Diagnostics signs
|
-- Diagnostics signs
|
||||||
local signs = utils.diagnostic_signs
|
for type, icon in pairs(utils.diagnostic_signs) do
|
||||||
|
|
||||||
for type, icon in pairs(signs) do
|
|
||||||
local hl = "DiagnosticSign" .. type
|
local hl = "DiagnosticSign" .. type
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||||
end
|
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)
|
-- Set built in features to use lsp functions (automatic in nvim-0.8)
|
||||||
-- HACK: Support for <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")
|
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
|
||||||
if server_capabilities.documentSymbolProvider then
|
if server_capabilities.documentSymbolProvider then
|
||||||
buf_set_option("tagfunc", "v:lua.vim.lsp.tagfunc")
|
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
|
-- Set some keybinds conditional on server capabilities
|
||||||
-- HACK: Support for <0.8
|
-- 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("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)
|
buf_set_keymap("v", "<leader>lf", "<cmd>lua vim.lsp.buf.format({async=true})<CR>", opts)
|
||||||
if server_capabilities.documentFormattingProvider then
|
if server_capabilities.documentFormattingProvider then
|
||||||
|
@ -68,7 +68,7 @@ function M.configure(options)
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- HACK: Support for <0.6
|
-- 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, {
|
vim.list_extend(sources, {
|
||||||
-- Text
|
-- Text
|
||||||
null_ls.builtins.diagnostics.alex,
|
null_ls.builtins.diagnostics.alex,
|
||||||
|
Loading…
Reference in New Issue
Block a user