diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2024-10-01 05:39:12 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-01 05:39:12 -0700 |
| commit | bedb2a0df105f68a624a49b867f269b6d55a2c89 (patch) | |
| tree | 877aa3ef8277575a7ffea1ff8f280eeb69b47489 /lua/lspconfig/server_configurations/haxe_language_server.lua | |
| parent | docs: CONTRIBUTING.md cleanup (diff) | |
| download | nvim-lspconfig-bedb2a0df105f68a624a49b867f269b6d55a2c89.tar nvim-lspconfig-bedb2a0df105f68a624a49b867f269b6d55a2c89.tar.gz nvim-lspconfig-bedb2a0df105f68a624a49b867f269b6d55a2c89.tar.bz2 nvim-lspconfig-bedb2a0df105f68a624a49b867f269b6d55a2c89.tar.lz nvim-lspconfig-bedb2a0df105f68a624a49b867f269b6d55a2c89.tar.xz nvim-lspconfig-bedb2a0df105f68a624a49b867f269b6d55a2c89.tar.zst nvim-lspconfig-bedb2a0df105f68a624a49b867f269b6d55a2c89.zip | |
refactor: rename "server_configurations" => "configs" #3330
Problem:
The name `server_configurations` is extremely verbose and irritatingly
formal and dogmatic. This overlong name is a constant nuisance when
reading, writing, and coding.
It's also not even correct: these configurations are just as much
"client" configurations as they are "server" configurations.
Solution:
- Rename to a shorter name.
- Leave placeholder files for any old URLs that link to the old
location.
Diffstat (limited to 'lua/lspconfig/server_configurations/haxe_language_server.lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/haxe_language_server.lua | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/lua/lspconfig/server_configurations/haxe_language_server.lua b/lua/lspconfig/server_configurations/haxe_language_server.lua deleted file mode 100644 index 4412238d..00000000 --- a/lua/lspconfig/server_configurations/haxe_language_server.lua +++ /dev/null @@ -1,74 +0,0 @@ -local util = require 'lspconfig.util' - -local function find_hxml(path) - return vim.fs.find(function(name) - return name:match '.hxml$' - end, { path = path, type = 'file' }) -end - -return { - default_config = { - cmd = { 'haxe-language-server' }, - filetypes = { 'haxe' }, - root_dir = util.root_pattern('*.hxml', '.git'), - settings = { - haxe = { - executable = 'haxe', - }, - }, - init_options = {}, - on_new_config = function(new_config, new_root_dir) - if new_config.init_options.displayArguments then - return - end - - local hxml = find_hxml(new_root_dir)[1] - if hxml then - vim.notify('Using HXML: ' .. hxml) - new_config.init_options.displayArguments = { hxml } - end - end, - }, - docs = { - description = [[ -https://github.com/vshaxe/haxe-language-server - -The Haxe language server can be built by running the following commands from -the project's root directory: - - npm install - npx lix run vshaxe-build -t language-server - -This will create `bin/server.js`. Note that the server requires Haxe 3.4.0 or -higher. - -After building the language server, set the `cmd` setting in your setup -function: - -```lua -lspconfig.haxe_language_server.setup({ - cmd = {"node", "path/to/bin/server.js"}, -}) -``` - -By default, the language server is configured with the HXML compiler arguments -contained in the first `.hxml` file found in your project's root directory. -If you want to specify which one to use, set the `init_options.displayArguments` -setting: - -```lua -lspconfig.haxe_language_server.setup({ - -- ... - init_options = { - displayArguments = { "build.hxml" }, - }, -}) -``` - -]], - default_config = { - root_dir = [[root_pattern("*.hxml", ".git")]], - init_options = 'default value is set by on_new_config', - }, - }, -} |
