diff options
| author | jdhao <jdhao@hotmail.com> | 2022-05-15 21:16:02 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2022-05-15 21:16:02 +0800 |
| commit | 4899a82b350dcaafc54623911788adc8afec7eec (patch) | |
| tree | 8938dad27e02978369a1f3633630f8e165b677f6 /lua/config/lsp.lua | |
| parent | 424981683efee76384480c68df4452269992bf78 (diff) | |
refactor: local fn = vim.fn
Diffstat (limited to 'lua/config/lsp.lua')
| -rw-r--r-- | lua/config/lsp.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua index 9ead5e5..b5fab6a 100644 --- a/lua/config/lsp.lua +++ b/lua/config/lsp.lua @@ -1,3 +1,4 @@ +local fn = vim.fn local api = vim.api local lsp = vim.lsp @@ -135,9 +136,9 @@ if utils.executable('bash-language-server') then }) end -local sumneko_binary_path = vim.fn.exepath("lua-language-server") +local sumneko_binary_path = fn.exepath("lua-language-server") if vim.g.is_mac or vim.g.is_linux and sumneko_binary_path ~= "" then - local sumneko_root_path = vim.fn.fnamemodify(sumneko_binary_path, ":h:h:h") + local sumneko_root_path = fn.fnamemodify(sumneko_binary_path, ":h:h:h") local runtime_path = vim.split(package.path, ";") table.insert(runtime_path, "lua/?.lua") @@ -173,10 +174,10 @@ if vim.g.is_mac or vim.g.is_linux and sumneko_binary_path ~= "" then end -- Change diagnostic signs. -vim.fn.sign_define("DiagnosticSignError", { text = "✗", texthl = "DiagnosticSignError" }) -vim.fn.sign_define("DiagnosticSignWarn", { text = "!", texthl = "DiagnosticSignWarn" }) -vim.fn.sign_define("DiagnosticSignInformation", { text = "", texthl = "DiagnosticSignInfo" }) -vim.fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint" }) +fn.sign_define("DiagnosticSignError", { text = "✗", texthl = "DiagnosticSignError" }) +fn.sign_define("DiagnosticSignWarn", { text = "!", texthl = "DiagnosticSignWarn" }) +fn.sign_define("DiagnosticSignInformation", { text = "", texthl = "DiagnosticSignInfo" }) +fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint" }) -- global config for diagnostic vim.diagnostic.config({ |
