aboutsummaryrefslogtreecommitdiffstats
path: root/lua
Commit message (Collapse)AuthorAgeFilesLines
* fix(fennel-ls): use closest cfg as root directory and fallback to git repo ↵Emma2024-10-061-1/+7
| | | | | root (#3325) Co-authored-by: Emma <emma@guugle.com>
* refactor: remove unnecessary codedundargoc2024-10-051-1/+0
|
* fix(health): skip format root when in single file mode (#3348)glepnir2024-10-041-0/+3
|
* Revert "fix: autostart=false: attach when editing new, nonexistent file ↵glepnir2024-10-041-13/+4
| | | | | #2712" (#3347) This reverts commit fb453a1a443b6ea6b54a1e4c101b1160c9d37950.
* feat: add ungrammar-languageserver support (#3312)Binh Tran2024-10-041-0/+34
|
* feat: add initial marko-js lsp config (#3228)Russ2024-10-041-0/+21
|
* fix: autostart=false: attach when editing new, nonexistent file #2712Iain King-Speir2024-10-031-4/+13
| | | | | | | | | | | | | | | | ## Problem Currently, `nvim-lspconfig` tries to attach servers automatically via two autocommands: 1. Created if `config.autostart == true` and triggered by `FileType`, if `config.filetypes` is set, else `BufReadPost`. Calls `try_add()`. 2. Created for each workspace root, triggered by `BufReadPost` matching paths starting with the root. Calls `try_add_wrapper()`. `BufReadPost` does not fire when creating a buffer for a file that doesn't exist. This means that if `config.autostart == true` and `config.filetypes` is set and includes the detected filetype for the buffer, the server is attached automatically regardless of whether the file exists, but in all other cases the server is only attached for existing files. ## Solution 1. Where these autocommands trigger on `BufReadPost`, also trigger on `BufNewFile`. 2. Wrap the autocommand callbacks in `vim.schedule()` to ensure `filetype` is set first, as the `BufReadPost`/`BufNewFile` autocommands will trigger before `FileType` if `nvim-lspconfig` is set up early enough during Nvim init (see https://github.com/neovim/neovim/issues/7367 and https://github.com/neovim/nvim-lspconfig/pull/2712#discussion_r1261063555). I did consider including a test with this PR, but there doesn't seem to be any existing test infrastructure for tests involving actually running a language server (or a mock of one). Fixes #2711
* feat(unocss): use filetypes from vscode extension #3317ryoppippi2024-10-031-2/+20
| | | ref: https://github.com/unocss/unocss/blob/35297359bf61917bda499db86e3728a7ebd05d6c/packages/vscode/src/autocomplete.ts#L12
* fix(health): root directory always "single file mode"Justin M. Keyes2024-10-031-10/+17
| | | | | | | | | | Problem: Root directory is always reported as "Running in single file mode". Solution: Don't prettify the filepath until "presenting" it. fix #3346
* fix: malformed version message in older Nvim #3345Micah Halter2024-10-031-2/+16
|
* feat: assert minimum required Nvim version #3338dundargoc2024-10-031-0/+10
|
* fix(health): support Nvim 0.9Justin M. Keyes2024-10-024-13/+13
| | | | fix #3342
* feat(lspinfo): replace :LspInfo with :checkhealth #3339Justin M. Keyes2024-10-023-283/+80
| | | | | | | | | | | | Problem: :LspInfo has its own "inner platlform" of highlights, mappings etc. And it doesn't integrate with :checkhealth. Solution: - Move the lspinfo code to a healthcheck. - LspInfo features such as highlights, "floating window" presentation, etc., should be added to :checkhealth in Nvim core, if they are really needed. - Define a "q" mapping until Nvim stable has that in :checkhealth.
* fix(zls): use workspace zls.json if available #2944Laurynas Lazauskas2024-10-021-0/+6
| | | | | | | | | | | | Language server config is read from `zls.json`. By default common global and user config directories are searched. However, this omits per-project configuration, which can be available in the workspace dir. We already look for `zls.json` to determine root dir, but we don't use it when starting the language server. This change appends `cmd` with `--config-path "zls.json"`, which uses the file when it's available and fall-backs to default logic when file is not available.
* refactor: replace deprecated vim.loop with vim.uvdundargoc2024-10-0215-17/+17
|
* feat: expose config definition as `config_def` #3335Justin M. Keyes2024-10-022-3/+8
| | | | | | | | | | | | | | Problem: Users/plugins may want to use the config definition without actually activating the config via setup(). Solution: - Expose `config_def` field and document it. - Also undeprecate some stuff that doesn't yet have a documented alternative. TODO: configs.lua sets `M.filetypes = config.filetypes` and other fields in ad-hoc fashion "for :LspInfo" but it's not clear when those fields are actually populated, and they don't source from `config_def`...
* feat: add vscoqtop (#3334)Jaehwang Jung2024-10-021-0/+17
|
* fix(julials): inverted `assert` check #3333Micah Halter2024-10-011-1/+1
|
* fix(lua-language-server): root directory pattern #3322Peter Kling2024-10-011-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Looking at the code for root dir detection for `lua_ls`: https://github.com/neovim/nvim-lspconfig/blob/9bda20fb967075355f253911bc066a8b5a03c77e/lua/lspconfig/server_configurations/lua_ls.lua#L17-L27 I was surprised that finding the git ancestor has lower priority than the `lua/` subdirectories (which, btw, is not mentioned in docs). Consider the following directory structure: HOME/ ├─ workspaces/ │ ├─ lua/ │ ├─ python/ │ ├─ work/ │ │ ├─ SomeProjectWithLuaFiles/ │ │ │ ├─ .git/ The `lua/` and `python/` directories contain some miscellaneous language-specific projects I sometimes work on. The project directory under work/ also contains some lua files. I expected the `.git` directory in the project to ensure that the project root dir is correctly detected to be `…/SomeProjectWithLuaFiles`. But since the [search for the `lua/` subdirectory](https://github.com/neovim/nvim-lspconfig/blob/9bda20fb967075355f253911bc066a8b5a03c77e/lua/lspconfig/server_configurations/lua_ls.lua#L22) is done first, my LSP detects `HOME/workspaces/` as the root directory. Solution: Search for the git ancestor before looking for the `lua/` subdirectory. Return the longer root path if both a `.git/` and a `lua/` ancestor are found. Fixes #3165
* refactor: rename "server_configurations" => "configs" #3330Justin M. Keyes2024-10-01332-4/+3
| | | | | | | | | | | | | | 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.
* feat(julials): JuliaActivateEnv command #3318Micah Halter2024-10-011-1/+65
|
* fix(stylelint_lsp): remove all javascript dialects from stylelint_lsp ↵Kai Moschcau2024-09-291-4/+0
| | | | | | filetypes (#3324) stylelint_lsp does not work with these and only gives syntax errors or wrong results on diagnostics.
* docs(taplo): update out of date docstring with new root_dir (#3319)Micah Halter2024-09-251-1/+1
|
* fix(cairo_ls): update bin_name value for cairo language server (#3315)Eric Alaribe2024-09-231-6/+3
| | | | | * fix(cairo_ls): update bin_name value for cairo language server * fix: pass cmd command directly to return cmd field
* fix(gopls): fix nil error when go env GOMODCACHE returns nothing (#3316)Connor2024-09-231-1/+3
|
* fix: root_dir support string value directly (#3313)glepnir2024-09-232-3/+7
| | | | | | root_dir in `vim.lsp.ClientConfig` can be a string type and in our annoation also mentioned `string|function` type. but actually root_dir does not support string type. add a type check of root_dir and then we can use `vim.fs.root` directly.
* fix(c3): fix typo of pattern (#3311)glepnir2024-09-211-1/+1
|
* fix(c3): update c3 root pattern (#3309)id3nom2024-09-211-5/+2
| | | | | | | | | | | * fix: add C3 library support fix(c3_lsp): update root directory to be able to handle project in the following order - a C3 project 'project.json', a library '.c3l' dir, and ancestor 'git' repo. --------- Co-authored-by: Justin M. Keyes <justinkz@gmail.com> Co-authored-by: glepnir <glephunter@gmail.com>
* fix(als): remove als config (#3310)Tama McGlinn2024-09-201-41/+0
| | | | | | | | | | | | Moved ALS config into own repo. See issue #1683 regarding problems with the current config. lspconfig is not intended to provide functional lsp configs, but rather a framework for other plugins to implement those. For more about that, see the discussion on https://github.com/neovim/nvim-lspconfig/pull/1693 The new ALS LSP config plugin is https://github.com/TamaMcGlinn/nvim-lspconfig-ada
* docs(lua_ls): fix fragile example code #3133Michael Härtl2024-09-191-3/+5
| | | | | Without this fix I get errors on startup: LSP[lua_ls]: Error ON_INIT_CALLBACK_ERROR: "[string ":lua"]:79: attempt to index field 'workspace_folders' (a nil value)"
* feat: show deprecate servers list in LspInfo (#3308)glepnir2024-09-182-28/+47
| | | | | | | | | | | | * feat: show deprecate servers list in LspInfo In order to smoothly transition to the vim.lsp.start interface in the future, adding checkhealth here is meaningless. Only the lspinfo information window is available. So shown deprecate servers list in LspInfo and update the server deprecate remove version to 0.2.1. 0.2.0 is tagged too quickly cause some servers not removed. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* fix(ltex-ls): command fails on windows when using mason (#3305)lucasbrg2024-09-171-6/+1
|
* fix: sourcekit lsp filetypes (#3301)Andrés Martínez2024-09-141-1/+5
| | | | | | * fix: sourcekit lsp filetypes Co-authored-by: glepnir <glephunter@gmail.com>
* feat: add c3-lsp support (#3299)xb-bx2024-09-121-0/+21
| | | | | * feat: add c3-lsp support * fix: merge root_pattern
* feat: add daedalus-language-server support (#3259)pm4rcin2024-09-111-0/+28
| | | | | | | | | | | | | * feat: add daedalus-language-server support Signed-off-by: Marcin Pachur <pm4rcin.dev.net667@silomails.com> * fixup! feat: add daedalus-language-server support Signed-off-by: Marcin Pachur <pm4rcin.dev.net667@silomails.com> --------- Signed-off-by: Marcin Pachur <pm4rcin.dev.net667@silomails.com>
* feat(ziggy): add ziggy and ziggy_schema support (#3296)Tim Culverhouse2024-09-102-0/+42
| | | | Add support for the Ziggy data serialization format language server. The server supports both the ziggy file format and the schema format
* feat(kcl): add kcl-language-server support (#3294)DrummyFloyd2024-09-101-0/+20
| | | | | * feat(kcl): add kcl-language-server support * fix: typo
* fix(snakeskin): change snakeskin lsp start command (#3293)Maxim Sinelnikov2024-09-091-1/+1
| | | Co-authored-by: Maksim Sinelnikov <sinelnikovweb@yandex-team.ru>
* docs(v-analyzer): change repository location to vlang org (#3292)Nemoola2024-09-091-2/+2
|
* feat(ts_ls)!: rename `tsserver` to `ts_ls` #3232Yi Ming2024-09-054-4/+10
| | | | | `tsserver` cannot be used as an abbreviation for `typescript-language-server`, because there is [`tsserver`](https://github.com/microsoft/TypeScript/wiki/Standalone-Server-(tsserver)) already and it is completely different from `typescript-language-server`. This is misleading. As the [README of `typescript-language-server`](https://github.com/typescript-language-server/typescript-language-server/blob/master/README.md) says, it's a wrapper of `tsserver`. This abuse has been around for so many time in lspconfig that people don't realize they are two different things, and are then confused by replacements of `typescript-language-server` like [typescript-tools.nvim](https://github.com/pmizio/typescript-tools.nvim) and [vtsls](https://github.com/yioneko/vtsls).
* docs(wgsl-analyzer): add missing close paren (#3290)Oughie2024-09-021-1/+1
| | | Fix the typo by adding the missing close paren.
* fix(bazelrc-lsp): rename bazelrc-lsp to bazelrc_lsp (#3287)Johan2024-08-301-0/+0
| | | | | Using bazelrc-lsp as the name makes it harder to import the module in Lua as it requires the dash to be escaped. This commit renames the lsp to bazelrc_lsp instead.
* feat: add snakeskin_ls server configuration (#3286)Maxim Sinelnikov2024-08-291-0/+19
| | | | | | | | | * feat: add snakeskin_ls server configuration * fix: add npx for command --------- Co-authored-by: Maksim Sinelnikov <sinelnikovweb@yandex-team.ru>
* fix: tea-leaves was renamed and replaced teal-language-server (#3285)Steve Vermeulen2024-08-272-37/+8
|
* feat: improve default haxe_language_server init_options (#3284)tobil4sk2024-08-261-8/+35
| | | | | | | | | | | | | | | | | | | | | * feat: add '.git' as root pattern for haxe_language_server * feat: use existing hxml for haxe ls configuration Previously, it would detect the root dir by matching with "*.hxml", however, it would use "build.hxml" as the default `displayArguments` even though it may not exist. This could cause the error: ``` haxe_language_server: -32603: Error: Could not process argument build.hxml (file not found) Invalid character: ``` Now it will use the first ".hxml" file that is found in the project. It will only do this if no `displayArguments` value has been set in the `setup()` call, so it will still respect user set values. If no hxml file is found, then it uses empty `displayArguments`, which is still better than a broken configuration.
* fix(rescripls): enable typechecking, improve doc (#3281)Buck Evan2024-08-231-1/+25
| | | | | | | | I was very confused to find that I got no typechecking by default, since ReScript is meant to be a very-strongly-typed language. The intent seems to be to use the "askToStartBuild" option to start an external build, which integrates with the lsp for typing, but that prompt is much too buggy, and the incremental typing (enabled in this PR) works well for me.
* fix(r-language-server): use `--no-echo` instead of `--slave` (#3280)mutlusun2024-08-231-1/+1
| | | | | | | | | Starting from R version 4.0.0, the command line option `--slave` were renamed to `--no-echo`. See the relevant news for 4.0.0: https://cran.r-project.org/bin/windows/base/old/4.0.0/NEWS.R-4.0.0.html and the corresponding commit: https://github.com/wch/r-source/commit/f1ff49e74593341c74c20de9517f31a22c8bcb04
* fix(scheme-langserver): defaultly enable log/out/multi-thread and disable ↵ufo52609874232024-08-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | type-inference (#3278) * feat: add scheme-langserver support * fix * fix: format with stylua * fix: fixup! * fix: format with stylua * fix(scheme-langserver): defaultly enable log/out/threads and disable type-inference * fix(scheme-langserver):remove out option * fix(scheme-langserver):replace double quote to single quote * fix(scheme-langserver): remove bin_name --------- Co-authored-by: Raphael <glephunter@gmail.com>
* fix(als): deprecate als in favour of a separate plugin (#3277)Tama McGlinn2024-08-221-0/+4
| | | | | | | | | To move towards the goal of having lsp configs decentralised and lower the maintenance burden on current maintainers, as requested by @glepnir, @mjlbach and @justinmk See https://github.com/neovim/nvim-lspconfig/pull/1693 and https://github.com/neovim/nvim-lspconfig/issues/1683 and https://github.com/neovim/nvim-lspconfig/pull/3275#issuecomment-2301318994
* fix(texlab): do not pass buf as parameter (#3276)Dimitris Dimitropoulos2024-08-211-48/+26
| | | | | | | | | | | | | * fix(texlab): do not pass buf as parameter Signed-off-by: Dimitris Dimitropoulos <dimitris.dimitropoulos00@gmail.com> * fix(texlab): use make_params lsp util Signed-off-by: Dimitris Dimitropoulos <dimitris.dimitropoulos00@gmail.com> --------- Signed-off-by: Dimitris Dimitropoulos <dimitris.dimitropoulos00@gmail.com>