aboutsummaryrefslogtreecommitdiffstats
path: root/lua
Commit message (Collapse)AuthorAgeFilesLines
...
* feat(docs): autogenerate default_config docsJustin M. Keyes2024-10-2412-77/+16
| | | | | | | | | Problem: Docs are manually maintained everywhere for no good reason. Solution: - revert commit 9dc02492c4a457479f8a0ec7a65aac1852ff59c0 - provide a "gF" friendly link to the source
* feat: ada_ls #3394Ghjuvan Lacambre2024-10-241-0/+32
| | | | | | | | | | | | | | The configuration for the Ada Language Server was first added in #171 and removed in #3310. The removal happened due to misunderstandings, it was thought at the time that the default language server configuration could not work on its own (#1683), it turns out that this was actually caused by a bug in the ALS that was fixed a long time ago. This means the default ALS configuration can be re-introduced. However, in the meantime, a new neovim plugin for Ada was created and the name "als" was borrowed, thus we have to use a new name, ada_ls, in order to avoid breaking this plugin. This reverts commit 7b8b0b3ddd0ed6eddc93982753acaddc578defac.
* chore(config): improve on_new_config type (#3392)andrew snelling2024-10-231-1/+1
|
* fix(lua_ls): when neither lua or git root found, return nil. See #3322 (#3391)Folke Lemaitre2024-10-221-0/+3
|
* fix(health): "attempt to index cmd (function)" #3390Justin M. Keyes2024-10-201-1/+2
| | | | | | | | | | Problem: `cmd` may be a random function instead of an executable command. ERROR Failed to run healthcheck for "lspconfig" plugin. Exception: .../lua/lspconfig/health.lua:127: attempt to index field 'cmd' (a function value) Solution: Skip attempt to invoke `<cmd> --version` if `cmd` is a function.
* fix(health): improve version reporting #3388Justin M. Keyes2024-10-191-18/+15
| | | | | | - try the next command if: - version pattern is not matched - exitcode is nonzero or timeout. - truncate long output
* fix(health): support gopls version command (#3386)Scott Penrose2024-10-191-1/+1
|
* fix(lspinfo): improve version check, deduplicate #3383Justin M. Keyes2024-10-181-67/+89
| | | | | | | - improve version handling: try --version, -v, etc. - avoid hanging commands (timeout after 1s). - also collect stderr. - show "Tried: ..." on failure. - omit "custom handlers" if none found.
* feat(lspinfo): also show version in make_client_info #3382Justin M. Keyes2024-10-181-5/+8
| | | | | | | Problem: version is only printed for make_config_info. Solution: Add it to make_client_info.
* docs(lua_ls): hint about personal config #3381Jean-Charles Quillet2024-10-181-1/+1
|
* feat(lspinfo): print `<cmd> --version` resultJustin M. Keyes2024-10-181-0/+18
|
* fix(lspinfo)!: remove config.lspinfoJustin M. Keyes2024-10-182-21/+0
| | | | | | | | | | | | | | | Problem: `config.lspinfo` is an undocumented feature that allows extending the info shown in `:LspInfo` (`:checkhealth lspconfig`). This feature is unwanted because: - it's undocumented - it adds a maintenance burden - it provides info that should be derived from the LSP protocol itself. Solution: Remove support for `config.lspinfo`. Instead, `:LspInfo` (`:checkhealth lspconfig`) should be enhanced to automatically gather this kind of extra info from the server response.
* docs(lsp_ai): description string instead of table (#3374)Austin Horstman2024-10-161-3/+1
| | | Follow suit of other descriptions that are just strings
* docs(jqls, uvls): remove needy backslashes #3373Cdrman Fu2024-10-152-6/+6
|
* fix(texlab): remove deprecated texlab.auxDirectory #3255Thibault de Villèle2024-10-141-1/+0
| | | | | | | | | | | The configuration key 'texlab.auxDirextory' has been deprecated, in favor of 'texlab.build.auxDir', mirroring the latexmkrc's auxDir variable. https://github.com/latex-lsp/texlab/wiki/Configuration#deprecated-texlabauxdirectory texlab.build.auxDir has a default value of `.` in texlab if not explicitly set, or if the user has no `latexmkrc` file. https://github.com/latex-lsp/texlab/wiki/Configuration#texlabbuildauxdirectory
* fix(biome): remove 'css' duplicate #3372leaked memory2024-10-141-5/+4
|
* fix: add graphql and css support for biome (#3370)John Ferlito2024-10-141-0/+2
|
* feat: poryscript-pls (#3366)Rachel2024-10-121-0/+20
|
* docs(lsp_ai): fix docs not rendering properly (#3364)Robzz2024-10-111-1/+3
|
* docs: fix old URLJustin M. Keyes2024-10-091-1/+1
|
* feat: lsp-ai #3206Robzz2024-10-091-0/+27
|
* feat: add basics_ls server config (#3361)Anton Kastritskii2024-10-091-0/+30
| | | | | Basics language server provides completion for buffer words, paths, and snippets. The goal is to allow current neovim users to test the built-in lsp completion without 3rd party plugins until neovim gains support for adding custom completion sources.
* feat(configs): add kulala_ls (#3360)Marco Kellershoff2024-10-071-0/+23
| | | | | A minimal language server for HTTP syntax. See: https://github.com/mistweaverco/kulala-ls
* fix(harper_ls): filetype "csharp" -> "cs" #3358Rui Chen2024-10-061-1/+1
|
* 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.