Commit graph

30 commits

Author SHA1 Message Date
Alexander S.
b04041d1cf
fix(vscode)!: use .oxlintrc.json as default value for oxc.configPath (#7442)
**BREAKING CHANGE**: VSCode-Client does not watch for `eslint`
configuration files. Default value for `oxc.configPath` is now
`.oxlintrc.json` instead of `.eslintrc`
2024-11-24 12:32:44 +08:00
Alexander S.
779f4798e2
test(editor): check if workspace configuration is updated (#7403)
setter methods can not return anything (void), so that why I needed to
refactor them :)
2024-11-23 12:59:18 +08:00
Alexander S.
466f395816
refactor(vscode): split ConfigService and Config (#7376)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-21 09:57:09 +08:00
Alexander S.
5190b7fb28
test(editor): add test setup (#7361)
Tried it with `vitest`, but there was too many problems with `vscode`
integration.
That why I followed the official guide:
-
https://code.visualstudio.com/api/working-with-extensions/testing-extension#migrating-from-vscode
-
https://code.visualstudio.com/api/working-with-extensions/continuous-integration
2024-11-20 12:46:01 +08:00
Alexander S.
ba0b2ff856
fix(editor): reload workspace configuration after change (#7302)
after changing `settings.json`, the changes whould not to updated
internally.

With this PR the updated values get passed to the language-server. 🥳 

probably closes https://github.com/oxc-project/backlog/issues/132
because we also support the oxlint config

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-16 13:34:44 +08:00
Nicholas Rayburn
4dd9b60f5a
feat(editor/vscode): Replace existing output channel and trace output channel with a single LogOutputChannel (#7196)
I don't think we need two separate channels for output. This replaces
the 2 existing channels with a single channel that allows configuring
the log level.

Ref #7136
2024-11-08 09:23:16 +08:00
Nicholas Rayburn
eea8879642
fix(editor/vscode): Update language client id to fix the resolution of the oxc.trace.server setting (#7181)
Currently `oxc-vscode.trace.server` needs to be used to enable trace
logging for the language server. This fixes it so that
`oxc.trace.server` can be used. I can't find any guidance on what should
be used for the language client id. The VS Code ESLint plugin uses
"ESLint", so I think this change should be fine.

Ref https://github.com/oxc-project/oxc/issues/7136.
2024-11-07 13:29:52 +08:00
Nicholas Rayburn
7872927fca
feat(editor/vscode): Support window/showMessage event (#7085)
Whenever the language server sends a `window/showMessage` event, VS Code
will listen and display a notification or log a message based on the
severity level of the message.

The language server doesn't currently send this event. I'm going to
follow up with a separate PR for that.

Ref https://github.com/oxc-project/oxc/issues/6988
2024-11-03 09:32:27 +08:00
Nicholas Rayburn
6b619da23a
feat(editor): Listen to config file changes and trigger a didChangeConfiguration update (#6964)
Watch eslint and oxlint config files for changes. When these files
change, a `didChangeConfiguration` event will be sent to the language
server.

Ref https://github.com/oxc-project/backlog/issues/132.
2024-10-28 08:39:24 +08:00
Nicholas Rayburn
ebf37539c0
fix(editor): Fix onConfigChange to send the correct config for didChangeConfiguration notification (#6962)
This currently fails because it sends over data that the language server
isn't prepared to deserialize. This updates to send over the correct
`LanguageServerConfig` type.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-28 08:38:57 +08:00
Nicholas Rayburn
1bcd707c8c
fix(editor): Update config sent to language server (#6724)
Syncs up the options from the language server `Options` struct with the
values that the extension supplies.

I tend to avoid `toJSON` because it will be used by `JSON.stringify`
when called and it's not well known.
There's no reason that `LanguageServerConfig` and `Config` have to both
exist, but I think two types is easier to understand.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-21 11:01:21 +08:00
DonIsaac
7f6b21925d feat(editor/vscode)!: unify configuration logic (#6630)
> Closes https://github.com/oxc-project/backlog/issues/132

Unify configuration logic into `ConfigService`. This allows for type-checked
config settings. It also lets us make sure config values are synced with what
the user has set in their vscode settings.

This PR is a breaking change since it also unifies config key prefixes (`oxc`
and `oxc_language_server` -> `oxc` only)
2024-10-16 22:31:29 +00:00
DonIsaac
cf9273090a fix(editor): use human-readable output channel names (#6629)
Changes the names of output channels our editor uses to make them friendlier.
2024-10-16 22:31:29 +00:00
DonIsaac
d9159a2445 fix(editor): misaligned command prefixes (#6628)
In the client code, we were registering commands under the `oxc` prefix, but in our `package.json` we were advertising a `oxc_language_server` prefix.
2024-10-16 22:31:28 +00:00
dalaoshu
b9c94bbc44
fix(editors/vscode): temporarily solve oxc_language_server issue on windows (#6384)
closes #6382 

It seems we cannot support `oxc_language_server` by directly reusing
code from `coc-oxc`, at least not on Windows, because it requires an
`.exe` executable.

I will take some time to study the implementation of `Biome` to enhance
our vscode plugin.
2024-10-09 20:52:54 +08:00
dalaoshu
f2721375ea
feat(editors/vscode): clear diagnostics on file deletion (#6326)
closes #6325
2024-10-07 10:42:01 +08:00
dalaoshu
1a5f293d9b
feat(editors/vscode): update VSCode extention to use project's language server (#6132)
closes #3426
2024-10-05 20:24:17 -04:00
Boshen
d00a1f6511
chore: use dprint to format js, json and markdown 2024-09-08 13:24:58 +08:00
IWANABETHATGUY
fe48bfae0c
feat(lsp): support vue, astro and svelte (#1923)
![image](https://github.com/oxc-project/oxc/assets/17974631/7d49b2a7-b587-45a9-8736-875a2e60f06e)
Closed https://github.com/oxc-project/oxc/issues/1915
2024-01-08 11:38:25 +08:00
IWANABETHATGUY
f30f6efcdd
chore: add some useful informantion log (#1912)
1. Use `log::info` to print some informantion which we would want to
display in release mode,
2. Add config to switch back `debug` log level in development mode.
2024-01-06 22:30:01 +08:00
IWANABETHATGUY
56e620b1bb
chore(lsp): normalize the lsp naming (#1873)
1. Fallback logic about `document/didChangeConfiguration`
2. normalize vscode naming
3. change `configuration` section name from `oxc-client` to
`oxc_langauge_server`.
2024-01-03 11:48:18 +08:00
Wenzhe Wang
665f818217
feat(vscode): support lint vue file (#1842)
![CleanShot 2023-12-27 at 22 56 34@2x](https://github.com/oxc-project/oxc/assets/33973865/189cc7e5-91e9-4f25-bd9c-14d663387870)
2023-12-31 22:31:26 +08:00
IWANABETHATGUY
de2f834774
chore: rename crate oxc_vscode to oxc_language_server (#1825)
1. Closed https://github.com/oxc-project/oxc/issues/1821
2023-12-26 23:01:12 +08:00
IWANABETHATGUY
37d5152cce
feat(vscode): use icon to represent enabled status (#1675) 2023-12-14 20:59:26 +08:00
IWANABETHATGUY
e529b38e32
feat: add option to control enable/disable oxc linter (#1665)
1. Closed https://github.com/oxc-project/oxc/issues/1655
2023-12-14 12:45:34 +08:00
IWANABETHATGUY
7594a9d10f
chore: format typescript and json file in editors/vscode (#1667)
1. just format, nothing else
2023-12-14 02:01:24 +08:00
IWANABETHATGUY
e63576d03c
feat(vscode): add a option to control oxc lint timing (#1659)
1. Closed https://github.com/oxc-project/oxc/issues/1653
2. Now you use `oxc-client.run` to control the lint timing.


[录屏 2023年12月12日
23时39分16秒.webm](https://github.com/oxc-project/oxc/assets/17974631/123326dc-6110-4f2e-9d48-ef1a3b0a4536)
2023-12-13 11:40:39 +08:00
Boshen
e2d5763d22
fix(vscode): fix the broken package path 2023-12-08 21:19:00 +08:00
IWANABETHATGUY
9897cab220
chore(vscode): improve dx (#1528) 2023-11-24 15:05:27 +08:00
Boshen
e4c097bb91
chore: mv dir editor/vscode to editors/vscode (#1203) 2023-11-09 21:13:11 +08:00