Commit Graph

22 Commits (main)

Author SHA1 Message Date
Philipp Mildenberger 9d089c27c7 Fix docgen again 12 months ago
Philipp Mildenberger 7d20740b5b Fix docgen and lsp-stop documentation 12 months ago
Philipp Mildenberger 71551d395b Adds support for multiple language servers per language.
Language Servers are now configured in a separate table in `languages.toml`:

```toml
[langauge-server.mylang-lsp]
command = "mylang-lsp"
args = ["--stdio"]
config = { provideFormatter = true }

[language-server.efm-lsp-prettier]
command = "efm-langserver"

[language-server.efm-lsp-prettier.config]
documentFormatting = true
languages = { typescript = [ { formatCommand ="prettier --stdin-filepath ${INPUT}", formatStdin = true } ] }
```

The language server for a language is configured like this (`typescript-language-server` is configured by default):

```toml
[[language]]
name = "typescript"
language-servers = [ { name = "efm-lsp-prettier", only-features = [ "format" ] }, "typescript-language-server" ]
```

or equivalent:

```toml
[[language]]
name = "typescript"
language-servers = [ { name = "typescript-language-server", except-features = [ "format" ] }, "efm-lsp-prettier" ]
```

Each requested LSP feature is priorized in the order of the `language-servers` array.
For example the first `goto-definition` supported language server (in this case `typescript-language-server`) will be taken for the relevant LSP request (command `goto_definition`).

If no `except-features` or `only-features` is given all features for the language server are enabled, as long as the language server supports these. If it doesn't the next language server which supports the feature is tried.

The list of supported features are:

- `format`
- `goto-definition`
- `goto-declaration`
- `goto-type-definition`
- `goto-reference`
- `goto-implementation`
- `signature-help`
- `hover`
- `document-highlight`
- `completion`
- `code-action`
- `workspace-command`
- `document-symbols`
- `workspace-symbols`
- `diagnostics`
- `rename-symbol`
- `inlay-hints`

Another side-effect/difference that comes with this PR, is that only one language server instance is started if different languages use the same language server.
12 months ago
Alexander Brevig 583f6a1337
feat: lint for `ui.virtual` and catch present and future virtual based features (#6320)
* feat: lint for inlay-hint.parameter and .type

* fix: lint against ui.virtual and not the new inlay-hint specifically
1 year ago
Pascal Kuthe 8a3ec443f1
Fix new clippy lints (#5892) 1 year ago
alice 8b25f44f05
build(deps): bump toml from 0.6.0 to 0.7.0 (#5726) 1 year ago
dependabot[bot] 52d854fa62 build(deps): bump toml from 0.5.10 to 0.6.0
Bumps [toml](https://github.com/toml-rs/toml) from 0.5.10 to 0.6.0.
- [Release notes](https://github.com/toml-rs/toml/releases)
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.5.10...toml-v0.6.0)

---
updated-dependencies:
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
Pascal Kuthe e9dc9f4935
Switch from toml::from_slice to toml::from_str (#5659) 1 year ago
Jonathan LEI eddf9f0b7f
Run clippy on workspace in CI (#4614) 2 years ago
Christian Speich 79ef39ab3a syntax: Don't force lower-case for filenames (#4346)
Just like for grammars we currently force a lower-case of the name for
some actions (like filesystem lookup). To make this consistent and less
surprising for users, we remove this lower-casing here.

Note: it is still the preferred way to name both language and grammar in
lower-case

Signed-off-by: Christian Speich <cspeich@emlix.com>
2 years ago
Alexis (Poliorcetics) Bourget 28cb89eadb chore: fix clippy linting 2 years ago
Alexander Brevig 08b2ecc99a
feat: xtask themelint (#3234)
* feat: cargo xtask themelint <theme>

* fix: add docs and print json error status

* fix: refactor paths -> path

* fix: remove unused function

* fix: only report one err per scope (ui.statusline is reported if none of ui.statusline.* is recognized)

* fix: save work for later

* fix: finally decided on a design

* fix: ready for discussion

* fix: better rules

* fix: lint precision

* fix: String -> &'static str

* fix: allowlist not denylist for file type

* fix: add missing and indication of what's needed

* fix: copy pasteable errors

* fix: use Loader:read_names

* Update xtask/src/helpers.rs

Co-authored-by: Ivan Tham <pickfire@riseup.net>

* fix: remove into and clone for str

* Update book/src/themes.md

Co-authored-by: Ivan Tham <pickfire@riseup.net>

* fix: better lint output

* fix: cleaner logic for lint reporting

* style: use explicit imports

* Pascal support (#3542)

* fix: add difference check for statusline normal,insert,select

* fix: fg for whitespace and early exit if and one is ok

* chore: cleaning up, no idea how these got here or how this will look

* chore: revert from older commit?

* refactor: use static fn to equalize api between difference and existance

* refactor: querycheck and clippy

* refactor: clippy fixes

* fix: query-check behaves as before

* fix: error with x of y message, not total count

* fix: consistent reporting and less mutable state

* fix: selection difference ref #3942 ref #1833

Co-authored-by: Ivan Tham <pickfire@riseup.net>
Co-authored-by: ath3 <45574139+ath3@users.noreply.github.com>
2 years ago
Michael Davis 4e4c6da3bf Add query-check xtask 2 years ago
Falco Hirschenberger ed89f8897e
Add workspace and document diagnostics picker (#2013)
* Add workspace and document diagnostics picker

fixes #1891

* Fix some of @archseer's annotations

* Add From<&Spans> impl for String

* More descriptive parameter names.

* Adding From<Cow<str>> impls for Span and Spans

* Add new keymap entries to docs

* Avoid some clones

* Fix api change

* Update helix-term/src/application.rs

Co-authored-by: Bjorn Ove Hay Andersen <bjrnove@gmail.com>

* Fix a clippy hint

* Sort diagnostics first by URL and then by severity.

* Sort diagnostics first by URL and then by severity.

* Ignore missing lsp severity entries

* Add truncated filepath

* Typo

* Strip cwd from paths and use url-path without schema

* Make tests a doctest

* Better variable names

Co-authored-by: Falco Hirschenberger <falco.hirschenberger@itwm.fraunhofer.de>
Co-authored-by: Bjorn Ove Hay Andersen <bjrnove@gmail.com>
2 years ago
Ben Lee-Cohen 09a17e4fa3
Making the 'set-option' command help more descriptive. (#2365)
* Making the 'set-option' command help more descriptive.

* Adding the generated docs

* Making the message multi-line

* Replace newline with break in generated docs
2 years ago
Gokul Soumya 194b09fbc1
Add --health command for troubleshooting (#1669)
* Move runtime file location definitions to core

* Add basic --health command

* Add language specific --health

* Show summary for all langs with bare --health

* Use TsFeature from xtask for --health

* cargo fmt

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2 years ago
Blaž Hrastnik 19247ff0ec
Split out typable commands into a separate file 2 years ago
Blaž Hrastnik f88c077f99 Replace tendril with smartstring
Slightly smaller API surface, less dependencies.
2 years ago
Blaž Hrastnik efaac6c5d3 Release 0.6 2 years ago
Gokul Soumya d08bdfa838 Use same name used in config files for langs in docs 2 years ago
Gokul Soumya a78b789406 Auto generate docs for language support 2 years ago
Gokul Soumya 71292f9f11 docs: Auto generate command list 2 years ago