Fix executable checks
This commit is contained in:
parent
88512f8b37
commit
3dbf38f875
@ -8,19 +8,19 @@ local capabilities = cmp_nvim_lsp.default_capabilities({snippetSupport = false})
|
|||||||
|
|
||||||
-- nvim-lspconfig
|
-- nvim-lspconfig
|
||||||
local nvim_lspconfig = require('lspconfig')
|
local nvim_lspconfig = require('lspconfig')
|
||||||
if vim.fn.executable('clangd') then
|
if vim.fn.executable('clangd') == 1 then
|
||||||
nvim_lspconfig.clangd.setup({capabilities = capabilities})
|
nvim_lspconfig.clangd.setup({capabilities = capabilities})
|
||||||
end
|
end
|
||||||
if vim.fn.executable('gopls') then
|
if vim.fn.executable('gopls') == 1 then
|
||||||
nvim_lspconfig.gopls.setup({capabilities = capabilities})
|
nvim_lspconfig.gopls.setup({capabilities = capabilities})
|
||||||
end
|
end
|
||||||
if vim.fn.executable('jedi-language-server') then
|
if vim.fn.executable('jedi-language-server') == 1 then
|
||||||
nvim_lspconfig.jedi_language_server.setup({capabilities = capabilities})
|
nvim_lspconfig.jedi_language_server.setup({capabilities = capabilities})
|
||||||
end
|
end
|
||||||
if vim.fn.executable('typescript-language-server') then
|
if vim.fn.executable('typescript-language-server') == 1 then
|
||||||
nvim_lspconfig.tsserver.setup({capabilities = capabilities})
|
nvim_lspconfig.tsserver.setup({capabilities = capabilities})
|
||||||
end
|
end
|
||||||
if vim.fn.executable('lua-language-server') then
|
if vim.fn.executable('lua-language-server') == 1 then
|
||||||
local runtime_path = vim.split(package.path, ';', {})
|
local runtime_path = vim.split(package.path, ';', {})
|
||||||
table.insert(runtime_path, 'lua/?.lua')
|
table.insert(runtime_path, 'lua/?.lua')
|
||||||
table.insert(runtime_path, 'lua/?/init.lua')
|
table.insert(runtime_path, 'lua/?/init.lua')
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
require('Comment').setup()
|
require('Comment').setup()
|
||||||
|
|
||||||
-- fzf.vim
|
-- fzf.vim
|
||||||
if vim.fn.executable('fzf') then
|
if vim.fn.executable('fzf') == 1 then
|
||||||
vim.g['$FZF_DEFAULT_COMMAND'] = 'ag --hidden --ignore .git -f -g "" 2> /dev/null'
|
vim.g['$FZF_DEFAULT_COMMAND'] = 'ag --hidden --ignore .git -f -g "" 2> /dev/null'
|
||||||
|
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
|
Loading…
Reference in New Issue
Block a user