Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package nvim-lspconfig for openSUSE:Factory checked in at 2025-01-07 20:51:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nvim-lspconfig (Old) and /work/SRC/openSUSE:Factory/.nvim-lspconfig.new.1881 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nvim-lspconfig" Tue Jan 7 20:51:30 2025 rev:3 rq:1235078 version:1.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/nvim-lspconfig/nvim-lspconfig.changes 2025-01-01 23:07:37.767774149 +0100 +++ /work/SRC/openSUSE:Factory/.nvim-lspconfig.new.1881/nvim-lspconfig.changes 2025-01-07 20:51:47.264864421 +0100 @@ -1,0 +2,23 @@ +Sun Jan 5 21:44:18 UTC 2025 - Richard Rahl <[email protected]> + +- update to 1.3.0: + * refactor: deprecate util.path.join + * refactor: deprecate util.path.path_separator + * refactor: silence luals warnings + * refactor: deprecate util.path.iterate_parents + * feat: add server configuration for autohotkey_lsp (init) + * refactor!: remove public interface of util.path.traverse_parents + * fix(mdx-analyzer): Duplicate node_modules folder causing errors, and + filetypes option + * fix: add build.gradle.kts for java language server + * feat: cue language server + * feat(ccls): add CclsSwitchSourceHeader + * fix(ccls): typo on request method + * refactor(clangd): imporve switchsourceheader handler + * fix(clangd): fix switchSourceHeader detection + * docs(ruby_lsp): Remove instructions for adding ruby-lsp to Gemfile + * feat: Update Harper's Supported Languages + * feat: atlas language server + * fix(msbuild): more root patterns + +------------------------------------------------------------------- Old: ---- nvim-lspconfig-1.2.0.tar.gz New: ---- nvim-lspconfig-1.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nvim-lspconfig.spec ++++++ --- /var/tmp/diff_new_pack.mBpWis/_old 2025-01-07 20:51:47.992894522 +0100 +++ /var/tmp/diff_new_pack.mBpWis/_new 2025-01-07 20:51:47.996894687 +0100 @@ -1,7 +1,7 @@ # # spec file for package nvim-lspconfig # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: nvim-lspconfig -Version: 1.2.0 +Version: 1.3.0 Release: 0 Summary: Quickstart configs for Nvim LSP License: Apache-2.0 ++++++ nvim-lspconfig-1.2.0.tar.gz -> nvim-lspconfig-1.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/.github/ci/run_sanitizer.sh new/nvim-lspconfig-1.3.0/.github/ci/run_sanitizer.sh --- old/nvim-lspconfig-1.2.0/.github/ci/run_sanitizer.sh 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/.github/ci/run_sanitizer.sh 2025-01-05 14:42:44.000000000 +0100 @@ -15,7 +15,7 @@ exit 1 fi -SEARCH_PATTERN='(util\.path\.dirname|util\.path\.sanitize|util\.path\.exists|util\.path\.is_file|util\.path\.is_dir|util\.find_mercurial_ancestor|util\.find_node_modules_ancestor|util\.find_package_json_ancestor|util\.find_git_ancestor)' +SEARCH_PATTERN='(util\.path\.dirname|util\.path\.sanitize|util\.path\.exists|util\.path\.is_file|util\.path\.is_dir|util\.path\.join|util\.path\.iterate_parents|util\.path\.traverse_parents|util\.find_mercurial_ancestor|util\.find_node_modules_ancestor|util\.find_package_json_ancestor|util\.find_git_ancestor)' if git diff --pickaxe-all -U0 -G "${SEARCH_PATTERN}" "${REF_BRANCH}" "${PR_BRANCH}" -- '*.lua' | grep -Ev '\.lua$' | grep -E "^\+.*${SEARCH_PATTERN}" ; then echo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/doc/configs.md new/nvim-lspconfig-1.3.0/doc/configs.md --- old/nvim-lspconfig-1.2.0/doc/configs.md 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/doc/configs.md 2025-01-05 14:42:44.000000000 +0100 @@ -17,6 +17,8 @@ - [asm_lsp](#asm_lsp) - [ast_grep](#ast_grep) - [astro](#astro) +- [atlas](#atlas) +- [autohotkey_lsp](#autohotkey_lsp) - [autotools_ls](#autotools_ls) - [awk_ls](#awk_ls) - [azure_pipelines_ls](#azure_pipelines_ls) @@ -61,6 +63,7 @@ - [cssls](#cssls) - [cssmodules_ls](#cssmodules_ls) - [cucumber_language_server](#cucumber_language_server) +- [cue](#cue) - [custom_elements_ls](#custom_elements_ls) - [cypher_ls](#cypher_ls) - [daedalus_ls](#daedalus_ls) @@ -803,6 +806,125 @@ - `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/astro.lua:9](../lua/lspconfig/configs/astro.lua#L9) +## atlas + +https://github.com/ariga/atlas + +Language server for Atlas config and scheme files. + +You may also need to configure the filetype for *.hcl files: + +`autocmd BufNewFile,BufRead atlas.hcl set filetype=atlas-config` +`autocmd BufNewFile,BufRead *.my.hcl set filetype=atlas-schema-mysql` +`autocmd BufNewFile,BufRead *.pg.hcl set filetype=atlas-schema-postgresql` +`autocmd BufNewFile,BufRead *.lt.hcl set filetype=atlas-schema-sqlite` +`autocmd BufNewFile,BufRead *.ch.hcl set filetype=atlas-schema-clickhouse` +`autocmd BufNewFile,BufRead *.ms.hcl set filetype=atlas-schema-mssql` +`autocmd BufNewFile,BufRead *.rs.hcl set filetype=atlas-schema-redshift` +`autocmd BufNewFile,BufRead *.test.hcl set filetype=atlas-test` +`autocmd BufNewFile,BufRead *.plan.hcl set filetype=atlas-plan` + +or + +```lua +vim.filetype.add({ + filename = { + ['atlas.hcl'] = 'atlas-config', + }, + pattern = { + ['.*/*.my.hcl'] = 'atlas-schema-mysql', + ['.*/*.pg.hcl'] = 'atlas-schema-postgresql', + ['.*/*.lt.hcl'] = 'atlas-schema-sqlite', + ['.*/*.ch.hcl'] = 'atlas-schema-clickhouse', + ['.*/*.ms.hcl'] = 'atlas-schema-mssql', + ['.*/*.rs.hcl'] = 'atlas-schema-redshift', + ['.*/*.test.hcl'] = 'atlas-test', + ['.*/*.plan.hcl'] = 'atlas-plan', + }, +}) +``` + +Snippet to enable the language server: +```lua +require'lspconfig'.atlas.setup{} +``` + +Default config: +- `cmd` : + ```lua + { "atlas", "tool", "lsp", "--stdio" } + ``` +- `filetypes` : + ```lua + { "atlas-*" } + ``` +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/atlas.lua:4](../lua/lspconfig/configs/atlas.lua#L4) +- `single_file_support` : `true` + + +## autohotkey_lsp + +https://github.com/thqby/vscode-autohotkey2-lsp + +AutoHotkey v2.0 LSP implementation + +Snippet to enable the language server: +```lua +require'lspconfig'.autohotkey_lsp.setup{} +``` + +Default config: +- `autostart` : `true` +- `cmd` : + ```lua + { "autohotkey_lsp", "--stdio" } + ``` +- `filetypes` : + ```lua + { "autohotkey" } + ``` +- `flags` : + ```lua + { + debounce_text_changes = 500 + } + ``` +- `init_options` : + ```lua + { + ActionWhenV1IsDetected = "Continue", + AutoLibInclude = "All", + CommentTags = "^;;\\s*(?<tag>.+)", + CompleteFunctionParens = false, + Diagnostics = { + ClassStaticMemberCheck = true, + ParamsCheck = true + }, + FormatOptions = { + array_style = "expand", + brace_style = "One True Brace", + break_chained_methods = false, + ignore_comment = false, + indent_string = "\t", + max_preserve_newlines = 2, + object_style = "none", + preserve_newlines = true, + space_after_double_colon = true, + space_before_conditional = true, + space_in_empty_paren = false, + space_in_other = true, + space_in_paren = false, + wrap_line_length = 0 + }, + InterpreterPath = "", + SymbolFoldinFromOpenBrace = false, + locale = "en-us" + } + ``` +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/autohotkey_lsp.lua:8](../lua/lspconfig/configs/autohotkey_lsp.lua#L8) +- `single_file_support` : `true` + + ## autotools_ls https://github.com/Freed-Wu/autotools-language-server @@ -1660,6 +1782,9 @@ require'lspconfig'.ccls.setup{} ``` +Commands: +- CclsSwitchSourceHeader: Switch between source/header + Default config: - `cmd` : ```lua @@ -1673,7 +1798,7 @@ ```lua "utf-32" ``` -- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/ccls.lua:4](../lua/lspconfig/configs/ccls.lua#L4) +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/ccls.lua:24](../lua/lspconfig/configs/ccls.lua#L24) - `single_file_support` : `false` @@ -2204,6 +2329,30 @@ - `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/cucumber_language_server.lua:2](../lua/lspconfig/configs/cucumber_language_server.lua#L2) +## cue + +https://github.com/cue-lang/cue + +CUE makes it easy to validate data, write schemas, and ensure configurations align with policies. + +Snippet to enable the language server: +```lua +require'lspconfig'.cue.setup{} +``` + +Default config: +- `cmd` : + ```lua + { "cue", "lsp" } + ``` +- `filetypes` : + ```lua + { "cue" } + ``` +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/cue.lua:4](../lua/lspconfig/configs/cue.lua#L4) +- `single_file_support` : `true` + + ## custom_elements_ls https://github.com/Matsuuu/custom-elements-language-server @@ -2881,8 +3030,8 @@ ```lua { "drools" } ``` -- `on_new_config` source (use "gF" to visit): [../lua/lspconfig/configs/drools_lsp.lua:38](../lua/lspconfig/configs/drools_lsp.lua#L38) -- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/drools_lsp.lua:38](../lua/lspconfig/configs/drools_lsp.lua#L38) +- `on_new_config` source (use "gF" to visit): [../lua/lspconfig/configs/drools_lsp.lua:36](../lua/lspconfig/configs/drools_lsp.lua#L36) +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/drools_lsp.lua:36](../lua/lspconfig/configs/drools_lsp.lua#L36) - `single_file_support` : `true` @@ -4439,7 +4588,7 @@ ``` - `filetypes` : ```lua - { "c", "cpp", "cs", "gitcommit", "go", "html", "java", "javascript", "lua", "markdown", "nix", "python", "ruby", "rust", "swift", "toml", "typescript", "typescriptreact" } + { "c", "cpp", "cs", "gitcommit", "go", "html", "java", "javascript", "lua", "markdown", "nix", "python", "ruby", "rust", "swift", "toml", "typescript", "typescriptreact", "haskell", "cmake" } ``` - `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/harper_ls.lua:2](../lua/lspconfig/configs/harper_ls.lua#L2) - `single_file_support` : `true` @@ -6016,7 +6165,7 @@ ``` - `filetypes` : ```lua - { "markdown.mdx" } + { "mdx" } ``` - `init_options` : ```lua @@ -6382,7 +6531,7 @@ ```lua {} ``` -- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/msbuild_project_tools_server.lua:4](../lua/lspconfig/configs/msbuild_project_tools_server.lua#L4) +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/msbuild_project_tools_server.lua:5](../lua/lspconfig/configs/msbuild_project_tools_server.lua#L5) ## mutt_ls @@ -8637,9 +8786,7 @@ standalone executable. ```sh -group :development do - gem "ruby-lsp", require: false -end +gem install ruby-lsp ``` Snippet to enable the language server: @@ -10869,7 +11016,7 @@ ```lua { "turtle", "ttl" } ``` -- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/turtle_ls.lua:30](../lua/lspconfig/configs/turtle_ls.lua#L30) +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/turtle_ls.lua:28](../lua/lspconfig/configs/turtle_ls.lua#L28) ## tvm_ffi_navigator diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/doc/configs.txt new/nvim-lspconfig-1.3.0/doc/configs.txt --- old/nvim-lspconfig-1.2.0/doc/configs.txt 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/doc/configs.txt 2025-01-05 14:42:44.000000000 +0100 @@ -17,6 +17,8 @@ - [asm_lsp](#asm_lsp) - [ast_grep](#ast_grep) - [astro](#astro) +- [atlas](#atlas) +- [autohotkey_lsp](#autohotkey_lsp) - [autotools_ls](#autotools_ls) - [awk_ls](#awk_ls) - [azure_pipelines_ls](#azure_pipelines_ls) @@ -61,6 +63,7 @@ - [cssls](#cssls) - [cssmodules_ls](#cssmodules_ls) - [cucumber_language_server](#cucumber_language_server) +- [cue](#cue) - [custom_elements_ls](#custom_elements_ls) - [cypher_ls](#cypher_ls) - [daedalus_ls](#daedalus_ls) @@ -803,6 +806,125 @@ - `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/astro.lua:9](../lua/lspconfig/configs/astro.lua#L9) +## atlas + +https://github.com/ariga/atlas + +Language server for Atlas config and scheme files. + +You may also need to configure the filetype for *.hcl files: + +`autocmd BufNewFile,BufRead atlas.hcl set filetype=atlas-config` +`autocmd BufNewFile,BufRead *.my.hcl set filetype=atlas-schema-mysql` +`autocmd BufNewFile,BufRead *.pg.hcl set filetype=atlas-schema-postgresql` +`autocmd BufNewFile,BufRead *.lt.hcl set filetype=atlas-schema-sqlite` +`autocmd BufNewFile,BufRead *.ch.hcl set filetype=atlas-schema-clickhouse` +`autocmd BufNewFile,BufRead *.ms.hcl set filetype=atlas-schema-mssql` +`autocmd BufNewFile,BufRead *.rs.hcl set filetype=atlas-schema-redshift` +`autocmd BufNewFile,BufRead *.test.hcl set filetype=atlas-test` +`autocmd BufNewFile,BufRead *.plan.hcl set filetype=atlas-plan` + +or + +```lua +vim.filetype.add({ + filename = { + ['atlas.hcl'] = 'atlas-config', + }, + pattern = { + ['.*/*.my.hcl'] = 'atlas-schema-mysql', + ['.*/*.pg.hcl'] = 'atlas-schema-postgresql', + ['.*/*.lt.hcl'] = 'atlas-schema-sqlite', + ['.*/*.ch.hcl'] = 'atlas-schema-clickhouse', + ['.*/*.ms.hcl'] = 'atlas-schema-mssql', + ['.*/*.rs.hcl'] = 'atlas-schema-redshift', + ['.*/*.test.hcl'] = 'atlas-test', + ['.*/*.plan.hcl'] = 'atlas-plan', + }, +}) +``` + +Snippet to enable the language server: +```lua +require'lspconfig'.atlas.setup{} +``` + +Default config: +- `cmd` : + ```lua + { "atlas", "tool", "lsp", "--stdio" } + ``` +- `filetypes` : + ```lua + { "atlas-*" } + ``` +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/atlas.lua:4](../lua/lspconfig/configs/atlas.lua#L4) +- `single_file_support` : `true` + + +## autohotkey_lsp + +https://github.com/thqby/vscode-autohotkey2-lsp + +AutoHotkey v2.0 LSP implementation + +Snippet to enable the language server: +```lua +require'lspconfig'.autohotkey_lsp.setup{} +``` + +Default config: +- `autostart` : `true` +- `cmd` : + ```lua + { "autohotkey_lsp", "--stdio" } + ``` +- `filetypes` : + ```lua + { "autohotkey" } + ``` +- `flags` : + ```lua + { + debounce_text_changes = 500 + } + ``` +- `init_options` : + ```lua + { + ActionWhenV1IsDetected = "Continue", + AutoLibInclude = "All", + CommentTags = "^;;\\s*(?<tag>.+)", + CompleteFunctionParens = false, + Diagnostics = { + ClassStaticMemberCheck = true, + ParamsCheck = true + }, + FormatOptions = { + array_style = "expand", + brace_style = "One True Brace", + break_chained_methods = false, + ignore_comment = false, + indent_string = "\t", + max_preserve_newlines = 2, + object_style = "none", + preserve_newlines = true, + space_after_double_colon = true, + space_before_conditional = true, + space_in_empty_paren = false, + space_in_other = true, + space_in_paren = false, + wrap_line_length = 0 + }, + InterpreterPath = "", + SymbolFoldinFromOpenBrace = false, + locale = "en-us" + } + ``` +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/autohotkey_lsp.lua:8](../lua/lspconfig/configs/autohotkey_lsp.lua#L8) +- `single_file_support` : `true` + + ## autotools_ls https://github.com/Freed-Wu/autotools-language-server @@ -1660,6 +1782,9 @@ require'lspconfig'.ccls.setup{} ``` +Commands: +- CclsSwitchSourceHeader: Switch between source/header + Default config: - `cmd` : ```lua @@ -1673,7 +1798,7 @@ ```lua "utf-32" ``` -- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/ccls.lua:4](../lua/lspconfig/configs/ccls.lua#L4) +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/ccls.lua:24](../lua/lspconfig/configs/ccls.lua#L24) - `single_file_support` : `false` @@ -2204,6 +2329,30 @@ - `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/cucumber_language_server.lua:2](../lua/lspconfig/configs/cucumber_language_server.lua#L2) +## cue + +https://github.com/cue-lang/cue + +CUE makes it easy to validate data, write schemas, and ensure configurations align with policies. + +Snippet to enable the language server: +```lua +require'lspconfig'.cue.setup{} +``` + +Default config: +- `cmd` : + ```lua + { "cue", "lsp" } + ``` +- `filetypes` : + ```lua + { "cue" } + ``` +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/cue.lua:4](../lua/lspconfig/configs/cue.lua#L4) +- `single_file_support` : `true` + + ## custom_elements_ls https://github.com/Matsuuu/custom-elements-language-server @@ -2881,8 +3030,8 @@ ```lua { "drools" } ``` -- `on_new_config` source (use "gF" to visit): [../lua/lspconfig/configs/drools_lsp.lua:38](../lua/lspconfig/configs/drools_lsp.lua#L38) -- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/drools_lsp.lua:38](../lua/lspconfig/configs/drools_lsp.lua#L38) +- `on_new_config` source (use "gF" to visit): [../lua/lspconfig/configs/drools_lsp.lua:36](../lua/lspconfig/configs/drools_lsp.lua#L36) +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/drools_lsp.lua:36](../lua/lspconfig/configs/drools_lsp.lua#L36) - `single_file_support` : `true` @@ -4439,7 +4588,7 @@ ``` - `filetypes` : ```lua - { "c", "cpp", "cs", "gitcommit", "go", "html", "java", "javascript", "lua", "markdown", "nix", "python", "ruby", "rust", "swift", "toml", "typescript", "typescriptreact" } + { "c", "cpp", "cs", "gitcommit", "go", "html", "java", "javascript", "lua", "markdown", "nix", "python", "ruby", "rust", "swift", "toml", "typescript", "typescriptreact", "haskell", "cmake" } ``` - `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/harper_ls.lua:2](../lua/lspconfig/configs/harper_ls.lua#L2) - `single_file_support` : `true` @@ -6016,7 +6165,7 @@ ``` - `filetypes` : ```lua - { "markdown.mdx" } + { "mdx" } ``` - `init_options` : ```lua @@ -6382,7 +6531,7 @@ ```lua {} ``` -- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/msbuild_project_tools_server.lua:4](../lua/lspconfig/configs/msbuild_project_tools_server.lua#L4) +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/msbuild_project_tools_server.lua:5](../lua/lspconfig/configs/msbuild_project_tools_server.lua#L5) ## mutt_ls @@ -8637,9 +8786,7 @@ standalone executable. ```sh -group :development do - gem "ruby-lsp", require: false -end +gem install ruby-lsp ``` Snippet to enable the language server: @@ -10869,7 +11016,7 @@ ```lua { "turtle", "ttl" } ``` -- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/turtle_ls.lua:30](../lua/lspconfig/configs/turtle_ls.lua#L30) +- `root_dir` source (use "gF" to visit): [../lua/lspconfig/configs/turtle_ls.lua:28](../lua/lspconfig/configs/turtle_ls.lua#L28) ## tvm_ffi_navigator diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/apex_ls.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/apex_ls.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/apex_ls.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/apex_ls.lua 2025-01-05 14:42:44.000000000 +0100 @@ -7,7 +7,7 @@ on_new_config = function(config) if not config.cmd and config.apex_jar_path then config.cmd = { - vim.env.JAVA_HOME and util.path.join(vim.env.JAVA_HOME, 'bin', 'java') or 'java', + vim.env.JAVA_HOME and (vim.env.JAVA_HOME .. '/bin/java') or 'java', '-cp', config.apex_jar_path, '-Ddebug.internal.errors=true', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/astro.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/astro.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/astro.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/astro.lua 2025-01-05 14:42:44.000000000 +0100 @@ -2,7 +2,7 @@ local function get_typescript_server_path(root_dir) local project_root = vim.fs.find('node_modules', { path = root_dir, upward = true })[1] - return project_root and (util.path.join(project_root, 'typescript', 'lib')) or '' + return project_root and (project_root .. '/typescript/lib') or '' end return { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/atlas.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/atlas.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/atlas.lua 1970-01-01 01:00:00.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/atlas.lua 2025-01-05 14:42:44.000000000 +0100 @@ -0,0 +1,54 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'atlas', 'tool', 'lsp', '--stdio' }, + filetypes = { + 'atlas-*', + }, + root_dir = function(fname) + return util.root_pattern('atlas.hcl')(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/ariga/atlas + +Language server for Atlas config and scheme files. + +You may also need to configure the filetype for *.hcl files: + +`autocmd BufNewFile,BufRead atlas.hcl set filetype=atlas-config` +`autocmd BufNewFile,BufRead *.my.hcl set filetype=atlas-schema-mysql` +`autocmd BufNewFile,BufRead *.pg.hcl set filetype=atlas-schema-postgresql` +`autocmd BufNewFile,BufRead *.lt.hcl set filetype=atlas-schema-sqlite` +`autocmd BufNewFile,BufRead *.ch.hcl set filetype=atlas-schema-clickhouse` +`autocmd BufNewFile,BufRead *.ms.hcl set filetype=atlas-schema-mssql` +`autocmd BufNewFile,BufRead *.rs.hcl set filetype=atlas-schema-redshift` +`autocmd BufNewFile,BufRead *.test.hcl set filetype=atlas-test` +`autocmd BufNewFile,BufRead *.plan.hcl set filetype=atlas-plan` + +or + +```lua +vim.filetype.add({ + filename = { + ['atlas.hcl'] = 'atlas-config', + }, + pattern = { + ['.*/*.my.hcl'] = 'atlas-schema-mysql', + ['.*/*.pg.hcl'] = 'atlas-schema-postgresql', + ['.*/*.lt.hcl'] = 'atlas-schema-sqlite', + ['.*/*.ch.hcl'] = 'atlas-schema-clickhouse', + ['.*/*.ms.hcl'] = 'atlas-schema-mssql', + ['.*/*.rs.hcl'] = 'atlas-schema-redshift', + ['.*/*.test.hcl'] = 'atlas-test', + ['.*/*.plan.hcl'] = 'atlas-plan', + }, +}) +``` + +]], + }, +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/autohotkey_lsp.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/autohotkey_lsp.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/autohotkey_lsp.lua 1970-01-01 01:00:00.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/autohotkey_lsp.lua 2025-01-05 14:42:44.000000000 +0100 @@ -0,0 +1,56 @@ +-- NOTE: AutoHotkey is used only on windows +local function get_autohotkey_path() + local path = vim.fn.exepath('autohotkey.exe') + return #path > 0 and path or '' +end + +return { + default_config = { + cmd = { 'autohotkey_lsp', '--stdio' }, + filetypes = { 'autohotkey' }, + root_dir = function(fname) + return vim.fs.dirname(vim.fs.find('package.json', { path = fname, upward = true })[1]) + end, + single_file_support = true, + autostart = true, + flags = { debounce_text_changes = 500 }, + --capabilities = capabilities, + --on_attach = custom_attach, + init_options = { + locale = 'en-us', + InterpreterPath = get_autohotkey_path(), + AutoLibInclude = 'All', + CommentTags = '^;;\\s*(?<tag>.+)', + CompleteFunctionParens = false, + SymbolFoldinFromOpenBrace = false, + Diagnostics = { + ClassStaticMemberCheck = true, + ParamsCheck = true, + }, + ActionWhenV1IsDetected = 'Continue', + FormatOptions = { + array_style = 'expand', + break_chained_methods = false, + ignore_comment = false, + indent_string = '\t', + max_preserve_newlines = 2, + brace_style = 'One True Brace', + object_style = 'none', + preserve_newlines = true, + space_after_double_colon = true, + space_before_conditional = true, + space_in_empty_paren = false, + space_in_other = true, + space_in_paren = false, + wrap_line_length = 0, + }, + }, + }, + docs = { + description = [[ +https://github.com/thqby/vscode-autohotkey2-lsp + +AutoHotkey v2.0 LSP implementation + ]], + }, +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/cadence.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/cadence.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/cadence.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/cadence.lua 2025-01-05 14:42:44.000000000 +0100 @@ -11,7 +11,7 @@ return util.root_pattern 'flow.json'(fname) or vim.env.HOME end, on_new_config = function(new_config, new_root_dir) - new_config.init_options.configPath = util.path.join(new_root_dir, 'flow.json') + new_config.init_options.configPath = new_root_dir .. '/flow.json' end, }, docs = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/ccls.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/ccls.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/ccls.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/ccls.lua 2025-01-05 14:42:44.000000000 +0100 @@ -1,5 +1,25 @@ local util = require 'lspconfig.util' +local function switch_source_header(bufnr) + local method_name = 'textDocument/switchSourceHeader' + bufnr = util.validate_bufnr(bufnr) + local client = util.get_active_client_by_name(bufnr, 'ccls') + if not client then + return vim.notify(('method %s is not supported by any servers active on the current buffer'):format(method_name)) + end + local params = vim.lsp.util.make_text_document_params(bufnr) + client.request(method_name, params, function(err, result) + if err then + error(tostring(err)) + end + if not result then + vim.notify('corresponding file cannot be determined') + return + end + vim.cmd.edit(vim.uri_to_fname(result)) + end, bufnr) +end + return { default_config = { cmd = { 'ccls' }, @@ -12,6 +32,14 @@ -- ccls does not support sending a null root directory single_file_support = false, }, + commands = { + CclsSwitchSourceHeader = { + function() + switch_source_header(0) + end, + description = 'Switch between source/header', + }, + }, docs = { description = [[ https://github.com/MaskRay/ccls/wiki diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/clangd.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/clangd.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/clangd.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/clangd.lua 2025-01-05 14:42:44.000000000 +0100 @@ -2,23 +2,23 @@ -- https://clangd.llvm.org/extensions.html#switch-between-sourceheader local function switch_source_header(bufnr) + local method_name = 'textDocument/switchSourceHeader' bufnr = util.validate_bufnr(bufnr) - local clangd_client = util.get_active_client_by_name(bufnr, 'clangd') - local params = { uri = vim.uri_from_bufnr(bufnr) } - if clangd_client then - clangd_client.request('textDocument/switchSourceHeader', params, function(err, result) - if err then - error(tostring(err)) - end - if not result then - print 'Corresponding file cannot be determined' - return - end - vim.api.nvim_command('edit ' .. vim.uri_to_fname(result)) - end, bufnr) - else - print 'method textDocument/switchSourceHeader is not supported by any servers active on the current buffer' + local client = util.get_active_client_by_name(bufnr, 'clangd') + if not client then + return vim.notify(('method %s is not supported by any servers active on the current buffer'):format(method_name)) end + local params = vim.lsp.util.make_text_document_params(bufnr) + client.request(method_name, params, function(err, result) + if err then + error(tostring(err)) + end + if not result then + vim.notify('corresponding file cannot be determined') + return + end + vim.cmd.edit(vim.uri_to_fname(result)) + end, bufnr) end local function symbol_info() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/cue.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/cue.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/cue.lua 1970-01-01 01:00:00.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/cue.lua 2025-01-05 14:42:44.000000000 +0100 @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'cue', 'lsp' }, + filetypes = { 'cue' }, + root_dir = function(fname) + return util.root_pattern(unpack({ 'cue.mod', '.git' }))(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/cue-lang/cue + +CUE makes it easy to validate data, write schemas, and ensure configurations align with policies. +]], + }, +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/drools_lsp.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/drools_lsp.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/drools_lsp.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/drools_lsp.lua 2025-01-05 14:42:44.000000000 +0100 @@ -1,9 +1,7 @@ -local util = require 'lspconfig.util' - local function get_java_bin(config) local java_bin = vim.tbl_get(config, 'drools', 'java', 'bin') if not java_bin then - java_bin = vim.env.JAVA_HOME and util.path.join(vim.env.JAVA_HOME, 'bin', 'java') or 'java' + java_bin = vim.env.JAVA_HOME and (vim.env.JAVA_HOME .. '/bin/java') or 'java' if vim.fn.has 'win32' == 1 then java_bin = java_bin .. '.exe' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/eslint.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/eslint.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/eslint.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/eslint.lua 2025-01-05 14:42:44.000000000 +0100 @@ -123,8 +123,8 @@ end -- Support Yarn2 (PnP) projects - local pnp_cjs = util.path.join(new_root_dir, '.pnp.cjs') - local pnp_js = util.path.join(new_root_dir, '.pnp.js') + local pnp_cjs = new_root_dir .. '/.pnp.cjs' + local pnp_js = new_root_dir .. '/.pnp.js' if vim.loop.fs_stat(pnp_cjs) or vim.loop.fs_stat(pnp_js) then config.cmd = vim.list_extend({ 'yarn', 'exec' }, config.cmd) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/foam_ls.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/foam_ls.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/foam_ls.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/foam_ls.lua 2025-01-05 14:42:44.000000000 +0100 @@ -6,7 +6,7 @@ filetypes = { 'foam', 'OpenFOAM' }, root_dir = function(fname) return util.search_ancestors(fname, function(path) - if vim.loop.fs_stat(util.path.join(path, 'system', 'controlDict')) then + if vim.loop.fs_stat(path .. '/system/controlDict') then return path end end) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/gitlab_ci_ls.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/gitlab_ci_ls.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/gitlab_ci_ls.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/gitlab_ci_ls.lua 2025-01-05 14:42:44.000000000 +0100 @@ -1,6 +1,6 @@ local util = require 'lspconfig.util' -local cache_dir = util.path.join(vim.loop.os_homedir(), '.cache/gitlab-ci-ls/') +local cache_dir = vim.loop.os_homedir() .. '/.cache/gitlab-ci-ls/' return { default_config = { cmd = { 'gitlab-ci-ls' }, @@ -8,7 +8,7 @@ root_dir = util.root_pattern('.gitlab*', '.git'), init_options = { cache_path = cache_dir, - log_path = util.path.join(cache_dir, 'log/gitlab-ci-ls.log'), + log_path = cache_dir .. '/log/gitlab-ci-ls.log', }, }, docs = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/glint.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/glint.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/glint.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/glint.lua 2025-01-05 14:42:44.000000000 +0100 @@ -6,8 +6,8 @@ on_new_config = function(config, new_root_dir) local project_root = vim.fs.find('node_modules', { path = new_root_dir, upward = true })[1] -- Glint should not be installed globally. - local node_bin_path = util.path.join(project_root, 'node_modules', '.bin') - local path = node_bin_path .. util.path.path_separator .. vim.env.PATH + local node_bin_path = project_root .. '/node_modules/.bin' + local path = node_bin_path .. (vim.fn.has('win32') == 1 and ';' or ':') .. vim.env.PATH if config.cmd_env then config.cmd_env.PATH = path else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/harper_ls.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/harper_ls.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/harper_ls.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/harper_ls.lua 2025-01-05 14:42:44.000000000 +0100 @@ -20,6 +20,8 @@ 'toml', 'typescript', 'typescriptreact', + 'haskell', + 'cmake', }, root_dir = function(fname) return vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/java_language_server.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/java_language_server.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/java_language_server.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/java_language_server.lua 2025-01-05 14:42:44.000000000 +0100 @@ -3,7 +3,7 @@ return { default_config = { filetypes = { 'java' }, - root_dir = util.root_pattern('build.gradle', 'pom.xml', '.git'), + root_dir = util.root_pattern('build.gradle', 'build.gradle.kts', 'pom.xml', '.git'), settings = {}, }, docs = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/jdtls.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/jdtls.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/jdtls.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/jdtls.lua 2025-01-05 14:42:44.000000000 +0100 @@ -8,19 +8,19 @@ } local function get_cache_dir() - return env.XDG_CACHE_HOME and env.XDG_CACHE_HOME or util.path.join(env.HOME, '.cache') + return env.XDG_CACHE_HOME and env.XDG_CACHE_HOME or env.HOME .. '/.cache' end local function get_jdtls_cache_dir() - return util.path.join(get_cache_dir(), 'jdtls') + return get_cache_dir() .. '/jdtls' end local function get_jdtls_config_dir() - return util.path.join(get_jdtls_cache_dir(), 'config') + return get_jdtls_cache_dir() .. '/config' end local function get_jdtls_workspace_dir() - return util.path.join(get_jdtls_cache_dir(), 'workspace') + return get_jdtls_cache_dir() .. '/workspace' end local function get_jdtls_jvm_args() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/jsonnet_ls.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/jsonnet_ls.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/jsonnet_ls.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/jsonnet_ls.lua 2025-01-05 14:42:44.000000000 +0100 @@ -3,8 +3,8 @@ -- common jsonnet library paths local function jsonnet_path(root_dir) local paths = { - util.path.join(root_dir, 'lib'), - util.path.join(root_dir, 'vendor'), + root_dir .. '/lib', + root_dir .. '/vendor', } return table.concat(paths, ':') end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/mdx_analyzer.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/mdx_analyzer.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/mdx_analyzer.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/mdx_analyzer.lua 2025-01-05 14:42:44.000000000 +0100 @@ -1,14 +1,14 @@ local util = require 'lspconfig.util' local function get_typescript_server_path(root_dir) - local project_root = vim.fs.find('node_modules', { path = root_dir, upward = true })[1] - return project_root and (util.path.join(project_root, 'node_modules', 'typescript', 'lib')) or '' + local project_root = vim.fs.dirname(vim.fs.find('node_modules', { path = root_dir, upward = true })[1]) + return project_root and (project_root .. '/node_modules/typescript/lib') or '' end return { default_config = { cmd = { 'mdx-language-server', '--stdio' }, - filetypes = { 'markdown.mdx' }, + filetypes = { 'mdx' }, root_dir = util.root_pattern 'package.json', single_file_support = true, settings = {}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/msbuild_project_tools_server.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/msbuild_project_tools_server.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/msbuild_project_tools_server.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/msbuild_project_tools_server.lua 2025-01-05 14:42:44.000000000 +0100 @@ -1,11 +1,10 @@ local host_dll_name = 'MSBuildProjectTools.LanguageServer.Host.dll' +local util = require 'lspconfig.util' return { default_config = { filetypes = { 'msbuild' }, - root_dir = function(fname) - return vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1]) - end, + root_dir = util.root_pattern('*.sln', '*.slnx', '*.*proj', '.git'), init_options = {}, cmd = { 'dotnet', host_dll_name }, }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/relay_lsp.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/relay_lsp.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/relay_lsp.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/relay_lsp.lua 2025-01-05 14:42:44.000000000 +0100 @@ -24,9 +24,9 @@ root_dir = util.root_pattern('relay.config.*', 'package.json'), on_new_config = function(config, root_dir) local project_root = vim.fs.find('node_modules', { path = root_dir, upward = true })[1] - local node_bin_path = util.path.join(project_root, 'node_modules', '.bin') - local compiler_cmd = { util.path.join(node_bin_path, 'relay-compiler'), '--watch' } - local path = node_bin_path .. util.path.path_separator .. vim.env.PATH + local node_bin_path = project_root .. '/node_modules/.bin' + local compiler_cmd = { node_bin_path .. '/relay-compiler', '--watch' } + local path = node_bin_path .. (vim.fn.has('win32') == 1 and ';' or ':') .. vim.env.PATH if config.cmd_env then config.cmd_env.PATH = path else @@ -35,7 +35,7 @@ if config.path_to_config then config.path_to_config = vim.fs.normalize(config.path_to_config) - local path_to_config = util.path.join(root_dir, config.path_to_config) + local path_to_config = table.concat({ root_dir, config.path_to_config }, '/') if vim.loop.fs_stat(path_to_config) then vim.list_extend(config.cmd, { config.path_to_config }) vim.list_extend(compiler_cmd, { config.path_to_config }) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/ruby_lsp.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/ruby_lsp.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/ruby_lsp.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/ruby_lsp.lua 2025-01-05 14:42:44.000000000 +0100 @@ -21,9 +21,7 @@ standalone executable. ```sh -group :development do - gem "ruby-lsp", require: false -end +gem install ruby-lsp ``` ]], }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/rust_analyzer.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/rust_analyzer.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/rust_analyzer.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/rust_analyzer.lua 2025-01-05 14:42:44.000000000 +0100 @@ -17,12 +17,12 @@ local function is_library(fname) local user_home = vim.fs.normalize(vim.env.HOME) - local cargo_home = os.getenv 'CARGO_HOME' or util.path.join(user_home, '.cargo') - local registry = util.path.join(cargo_home, 'registry', 'src') - local git_registry = util.path.join(cargo_home, 'git', 'checkouts') + local cargo_home = os.getenv 'CARGO_HOME' or user_home .. '/.cargo' + local registry = cargo_home .. '/registry/src' + local git_registry = cargo_home .. '/git/checkouts' - local rustup_home = os.getenv 'RUSTUP_HOME' or util.path.join(user_home, '.rustup') - local toolchains = util.path.join(rustup_home, 'toolchains') + local rustup_home = os.getenv 'RUSTUP_HOME' or user_home .. '/.rustup' + local toolchains = rustup_home .. '/toolchains' for _, item in ipairs { toolchains, registry, git_registry } do if util.path.is_descendant(item, fname) then @@ -54,7 +54,7 @@ '--format-version', '1', '--manifest-path', - util.path.join(cargo_crate_dir, 'Cargo.toml'), + cargo_crate_dir .. '/Cargo.toml', } local result = async.run_command(cmd) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/turtle_ls.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/turtle_ls.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/turtle_ls.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/turtle_ls.lua 2025-01-05 14:42:44.000000000 +0100 @@ -1,5 +1,3 @@ -local util = require 'lspconfig.util' - local bin_name = 'turtle-language-server' local bin_path = os.getenv 'NVM_BIN' local full_path @@ -16,14 +14,14 @@ end end for _, p in ipairs(paths) do - local candidate = util.path.join(p, bin_name) + local candidate = table.concat({ p, bin_name }, '/') if (vim.loop.fs_stat(candidate) or {}).type == 'file' then full_path = candidate break end end else - full_path = util.path.join(bin_path, bin_name) + full_path = table.concat({ bin_path, bin_name }, '/') end return { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/vala_ls.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/vala_ls.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/vala_ls.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/vala_ls.lua 2025-01-05 14:42:44.000000000 +0100 @@ -2,7 +2,7 @@ local meson_matcher = function(path) local pattern = 'meson.build' - local f = vim.fn.glob(util.path.join(path, pattern)) + local f = vim.fn.glob(table.concat({ path, pattern }, '/')) if f == '' then return nil end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/vdmj.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/vdmj.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/vdmj.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/vdmj.lua 2025-01-05 14:42:44.000000000 +0100 @@ -1,16 +1,16 @@ local util = require 'lspconfig.util' local function get_default_mavenrepo() - local repo = util.path.join(vim.env.HOME, '.m2', 'repository', 'dk', 'au', 'ece', 'vdmj') + local repo = vim.env.HOME .. '/.m2/repository/dk/au/ece/vdmj' if vim.loop.fs_stat(repo) then return repo else - return util.path.join(vim.env.HOME, '.m2', 'repository', 'com', 'fujitsu') + return vim.env.HOME .. '/.m2/repository/com/fujitsu' end end local function get_jar_path(config, package, version) - return util.path.join(config.options.mavenrepo, package, version, package .. '-' .. version .. '.jar') + return table.concat({ config.options.mavenrepo, package, version, package .. '-' .. version .. '.jar' }, '/') end local function with_precision(version, is_high_precision) @@ -18,11 +18,11 @@ end local function get_latest_installed_version(repo) - local path = util.path.join(repo, 'lsp') + local path = repo .. '/lsp' local sort = vim.fn.sort local subdirs = function(file) - local stat = vim.loop.fs_stat(util.path.join(path, file)) + local stat = vim.loop.fs_stat(table.concat({ path, file }, '/')) return stat.type == 'directory' and 1 or 0 end @@ -34,7 +34,7 @@ -- Special case, as vdmj store particular settings under root_dir/.vscode local function find_vscode_ancestor(startpath) return util.search_ancestors(startpath, function(path) - if vim.fn.isdirectory(util.path.join(path, '.vscode')) == 1 then + if vim.fn.isdirectory(path .. '/.vscode') == 1 then return path end end) @@ -48,11 +48,11 @@ return vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1]) or find_vscode_ancestor(fname) end, options = { - java = vim.env.JAVA_HOME and util.path.join(vim.env.JAVA_HOME, 'bin', 'java') or 'java', + java = vim.env.JAVA_HOME and (vim.env.JAVA_HOME .. '/bin/java') or 'java', java_opts = { '-Xmx3000m', '-Xss1m' }, annotation_paths = {}, mavenrepo = get_default_mavenrepo(), - logfile = util.path.join(vim.fn.stdpath 'cache', 'vdm-lsp.log'), + logfile = vim.fn.stdpath('cache') .. '/vdm-lsp.log', debugger_port = -1, high_precision = false, }, @@ -90,7 +90,7 @@ get_jar_path(config, 'vdmj', version), get_jar_path(config, 'annotations', version), get_jar_path(config, 'lsp', version), - util.path.join(root_dir, '.vscode'), + root_dir .. '/.vscode', unpack(config.options.annotation_paths), }, ':') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/volar.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/volar.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/configs/volar.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/configs/volar.lua 2025-01-05 14:42:44.000000000 +0100 @@ -2,7 +2,7 @@ local function get_typescript_server_path(root_dir) local project_root = vim.fs.find('node_modules', { path = root_dir, upward = true })[1] - return project_root and (util.path.join(project_root, 'typescript', 'lib')) or '' + return project_root and (project_root .. '/typescript/lib') or '' end -- https://github.com/vuejs/language-tools/blob/master/packages/language-server/lib/types.ts diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/lua/lspconfig/util.lua new/nvim-lspconfig-1.3.0/lua/lspconfig/util.lua --- old/nvim-lspconfig-1.2.0/lua/lspconfig/util.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/lua/lspconfig/util.lua 2025-01-05 14:42:44.000000000 +0100 @@ -107,10 +107,6 @@ end end - local function path_join(...) - return table.concat(M.tbl_flatten { ... }, '/') - end - -- Traverse the path calling cb along the way. local function traverse_parents(path, cb) path = vim.loop.fs_realpath(path) @@ -131,23 +127,6 @@ end end - -- Iterate the path until we find the rootdir. - local function iterate_parents(path) - local function it(_, v) - if v and not is_fs_root(v) then - v = vim.fs.dirname(v) - else - return - end - if v and vim.loop.fs_realpath(v) then - return v, path - else - return - end - end - return it, path, path - end - local function is_descendant(root, path) if not path then return false @@ -162,14 +141,8 @@ return dir == root end - local path_separator = iswin and ';' or ':' - return { - join = path_join, - traverse_parents = traverse_parents, - iterate_parents = iterate_parents, is_descendant = is_descendant, - path_separator = path_separator, } end)() @@ -181,7 +154,7 @@ return startpath end local guard = 100 - for path in M.path.iterate_parents(startpath) do + for path in vim.fs.parents(startpath) do -- Prevent infinite recursion if our algorithm breaks guard = guard - 1 if guard == 0 then @@ -204,7 +177,7 @@ startpath = M.strip_archive_subpath(startpath) for _, pattern in ipairs(patterns) do local match = M.search_ancestors(startpath, function(path) - for _, p in ipairs(vim.fn.glob(M.path.join(escape_wildcards(path), pattern), true, true)) do + for _, p in ipairs(vim.fn.glob(table.concat({ escape_wildcards(path), pattern }, '/'), true, true)) do if vim.loop.fs_stat(p) then return path end @@ -363,6 +336,17 @@ return stat and stat.type or false end +--- @deprecated use `table.concat({"path1", "path2"})` or regular string concatenation instead +function M.path.join(...) + return table.concat({ ... }, '/') +end + +--- @deprecated use `vim.fn.has('win32') == 1 and ';' or ':'` instead +M.path.path_separator = vim.fn.has('win32') == 1 and ';' or ':' + +--- @deprecated use `vim.fs.parents(path)` instead +M.path.iterate_parents = vim.fs.parents + --- @deprecated use `vim.fs.dirname(vim.fs.find('.hg', { path = startpath, upward = true })[1])` instead function M.find_mercurial_ancestor(startpath) return vim.fs.dirname(vim.fs.find('.hg', { path = startpath, upward = true })[1]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/scripts/docgen.lua new/nvim-lspconfig-1.3.0/scripts/docgen.lua --- old/nvim-lspconfig-1.2.0/scripts/docgen.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/scripts/docgen.lua 2025-01-05 14:42:44.000000000 +0100 @@ -41,7 +41,7 @@ assert(type(n) == 'string', 'n must be number or string') prefix = n end - local lines = vim.split(s, '\n', true) + local lines = vim.split(s, '\n') for i, line in ipairs(lines) do lines[i] = prefix .. line end @@ -89,7 +89,7 @@ vim.env.XDG_CACHE_HOME = '/home/user/.cache' -- Configs are lazy-loaded, tickle them to populate the `configs` singleton. - for _, v in ipairs(vim.fn.glob('lua/lspconfig/configs/*.lua', 1, 1)) do + for _, v in ipairs(vim.fn.glob('lua/lspconfig/configs/*.lua', true, true)) do local module_name = v:gsub('.*/', ''):gsub('%.lua$', '') configs[module_name] = require('lspconfig.configs.' .. module_name) end @@ -178,7 +178,7 @@ end end, function() - local package_json_name = util.path.join(tempdir, config_name .. '.package.json') + local package_json_name = table.concat({ tempdir, config_name .. '.package.json' }, '/') if docs.package_json then if not ((vim.loop.fs_stat(package_json_name) or {}).type == 'file') then os.execute(string.format('curl -v -L -o %q %q', package_json_name, docs.package_json)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvim-lspconfig-1.2.0/test/lspconfig_spec.lua new/nvim-lspconfig-1.3.0/test/lspconfig_spec.lua --- old/nvim-lspconfig-1.2.0/test/lspconfig_spec.lua 2024-12-19 11:33:57.000000000 +0100 +++ new/nvim-lspconfig-1.3.0/test/lspconfig_spec.lua 2025-01-05 14:42:44.000000000 +0100 @@ -1,7 +1,9 @@ local root = vim.fn.getcwd() describe('lspconfig', function() + --- @diagnostic disable-next-line:undefined-field local eq = assert.are.equal + --- @diagnostic disable-next-line:undefined-field local same = assert.are.same before_each(function() @@ -9,16 +11,6 @@ end) describe('util', function() - describe('path', function() - describe('join', function() - it('', function() - local lspconfig = require 'lspconfig' - local res = lspconfig.util.path.join('foo', 'bar', 'baz') - eq('foo/bar/baz', res) - end) - end) - end) - describe('root_pattern', function() it('resolves to a_marker.txt', function() local lspconfig = require 'lspconfig'
