| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
root (#3325)
Co-authored-by: Emma <emma@guugle.com>
|
| | |
|
| | |
|
| |
|
|
|
| |
#2712" (#3347)
This reverts commit fb453a1a443b6ea6b54a1e4c101b1160c9d37950.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
## 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
|
| |
|
| |
ref: https://github.com/unocss/unocss/blob/35297359bf61917bda499db86e3728a7ebd05d6c/packages/vscode/src/autocomplete.ts#L12
|
| |
|
|
|
|
|
|
|
|
| |
Problem:
Root directory is always reported as "Running in single file mode".
Solution:
Don't prettify the filepath until "presenting" it.
fix #3346
|
| | |
|
| | |
|
| |
|
|
| |
fix #3342
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`...
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
| |
filetypes (#3324)
stylelint_lsp does not work with these and only gives syntax errors or
wrong results on diagnostics.
|
| | |
|
| |
|
|
|
| |
* fix(cairo_ls): update bin_name value for cairo language server
* fix: pass cmd command directly to return cmd field
|
| | |
|
| |
|
|
|
|
| |
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: 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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
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
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: sourcekit lsp filetypes
Co-authored-by: glepnir <glephunter@gmail.com>
|
| |
|
|
|
| |
* feat: add c3-lsp support
* fix: merge root_pattern
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
| |
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
* fix: typo
|
| |
|
| |
Co-authored-by: Maksim Sinelnikov <sinelnikovweb@yandex-team.ru>
|
| | |
|
| |
|
|
|
| |
`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).
|
| |
|
| |
Fix the typo by adding the missing close paren.
|
| |
|
|
|
| |
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
* fix: add npx for command
---------
Co-authored-by: Maksim Sinelnikov <sinelnikovweb@yandex-team.ru>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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
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>
|