aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2024-12-01 15:41:11 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2024-12-08 18:38:48 +0100
commit687fcb939b7de052a3ba6c300348fcd5eb128e83 (patch)
tree2b25a2658f59f87fb7e6cfc6a999ab868fce8d72
parentrefactor: deprecate util.find_node_modules_ancestor (diff)
downloadnvim-lspconfig-687fcb939b7de052a3ba6c300348fcd5eb128e83.tar
nvim-lspconfig-687fcb939b7de052a3ba6c300348fcd5eb128e83.tar.gz
nvim-lspconfig-687fcb939b7de052a3ba6c300348fcd5eb128e83.tar.bz2
nvim-lspconfig-687fcb939b7de052a3ba6c300348fcd5eb128e83.tar.lz
nvim-lspconfig-687fcb939b7de052a3ba6c300348fcd5eb128e83.tar.xz
nvim-lspconfig-687fcb939b7de052a3ba6c300348fcd5eb128e83.tar.zst
nvim-lspconfig-687fcb939b7de052a3ba6c300348fcd5eb128e83.zip
refactor: remove outdated code
Lspconfig requires neovim version 0.9 at the time of writing this, so discard any version checks and code for older versions.
-rw-r--r--doc/lspconfig.txt4
-rw-r--r--lua/lspconfig/configs/gdscript.lua6
-rw-r--r--lua/lspconfig/health.lua2
-rw-r--r--plugin/lspconfig.lua11
4 files changed, 3 insertions, 20 deletions
diff --git a/doc/lspconfig.txt b/doc/lspconfig.txt
index 7ae15890..0590a5d4 100644
--- a/doc/lspconfig.txt
+++ b/doc/lspconfig.txt
@@ -471,9 +471,7 @@ When debugging language servers, it is helpful to enable additional logging in
the built-in client, specifically considering the RPC logs. Example: >lua
vim.lsp.set_log_level 'trace'
- if vim.fn.has 'nvim-0.5.1' == 1 then
- require('vim.lsp.log').set_format_func(vim.inspect)
- end
+ require('vim.lsp.log').set_format_func(vim.inspect)
<
Attempt to run the language server, and open the log with:
diff --git a/lua/lspconfig/configs/gdscript.lua b/lua/lspconfig/configs/gdscript.lua
index 20305333..e0c9ba10 100644
--- a/lua/lspconfig/configs/gdscript.lua
+++ b/lua/lspconfig/configs/gdscript.lua
@@ -1,11 +1,7 @@
local util = require 'lspconfig.util'
local port = os.getenv 'GDScript_Port' or '6005'
-local cmd = { 'nc', 'localhost', port }
-
-if vim.fn.has 'nvim-0.8' == 1 then
- cmd = vim.lsp.rpc.connect('127.0.0.1', port)
-end
+local cmd = vim.lsp.rpc.connect('127.0.0.1', tonumber(port))
return {
default_config = {
diff --git a/lua/lspconfig/health.lua b/lua/lspconfig/health.lua
index 94104f88..64c584cf 100644
--- a/lua/lspconfig/health.lua
+++ b/lua/lspconfig/health.lua
@@ -189,7 +189,7 @@ end
local function make_client_info(client, fname)
local client_info, info_lines = make_info(client)
- local workspace_folders = fn.has 'nvim-0.9' == 1 and client.workspace_folders or client.workspaceFolders
+ local workspace_folders = client.workspace_folders
fname = vim.fs.normalize(vim.loop.fs_realpath(fname) or fn.fnamemodify(fn.resolve(fname), ':p'))
if workspace_folders then
diff --git a/plugin/lspconfig.lua b/plugin/lspconfig.lua
index bee81092..a852d967 100644
--- a/plugin/lspconfig.lua
+++ b/plugin/lspconfig.lua
@@ -6,17 +6,6 @@ vim.g.lspconfig = 1
local api, lsp = vim.api, vim.lsp
local util = require('lspconfig.util')
-if vim.fn.has 'nvim-0.8' ~= 1 then
- local version_info = vim.version()
- local warning_str = string.format(
- '[lspconfig] requires neovim 0.8 or later. Detected neovim version: 0.%s.%s',
- version_info.minor,
- version_info.patch
- )
- vim.notify_once(warning_str)
- return
-end
-
local completion_sort = function(items)
table.sort(items)
return items