Comments (3)
We might need to make things less strict because currently LSP only sends the corresponding code action if the server announces support for it in its initialize
response.
Since this functionality is not specified anywhere but rather based on VSCode, we should align with it. VSCode seems to send all user-specified editor.codeActionsOnSave
to every server but interestingly not all together but in a separate requests. So when using biome
in a TS file with editor.codeActionsOnSave
set to:
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit",
"source.organizeImports.biome": "explicit",
},
I can see 3 separate textDocument/codeAction
request sent to biome:
[Trace - 21:27:10] Sending request 'textDocument/codeAction - (28)'.
Params: {
"textDocument": {
"uri": "file:///usr/local/workspace/.../routes.ts"
},
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 283,
"character": 0
}
},
"context": {
"diagnostics": [
{
"range": {
"start": {
"line": 17,
"character": 26
},
"end": {
"line": 17,
"character": 29
}
},
"message": "'req' is declared but its value is never read.",
"code": 6133,
"severity": 4,
"tags": [
1
],
"source": "ts"
},
{
"range": {
"start": {
"line": 86,
"character": 26
},
"end": {
"line": 86,
"character": 29
}
},
"message": "'req' is declared but its value is never read.",
"code": 6133,
"severity": 4,
"tags": [
1
],
"source": "ts"
},
{
"range": {
"start": {
"line": 217,
"character": 26
},
"end": {
"line": 217,
"character": 29
}
},
"message": "'req' is declared but its value is never read.",
"code": 6133,
"severity": 4,
"tags": [
1
],
"source": "ts"
}
],
"only": [
"source.fixAll.eslint"
],
"triggerKind": 2
}
}
where "only" includes a single, different code action in each.
from lsp.
Similar to @hrasekj : I have my LSP.sublime-settings configured to not fix or organize on save, but fixAll is being applied regardless and I can't figure out how to turn it off. My user settings are being ignored.
{
// General settings
"lsp_format_on_save": false,
"lsp_code_actions_on_save": {
"source.fixAll": false,
"source.organizeImports": false,
},
"show_inlay_hints": false,
"semantic_highlighting": true,
// Language server configurations
"clients": {
"zig": {
// the startup command -- what you would type in a terminal
"command": ["/home/vesper/.zls/zls"],
// enable this configuration
"enabled": true,
// the selector that selects which type of buffers this language server attaches to
"selector": "source.zig",
}
}
}
from lsp.
That's an opposite problem to this one. Feel free to create another issue for it.
from lsp.
Related Issues (20)
- Capabilites with selector fails to register
- ModuleNotFoundError: No module named 'wcmatch.glob' HOT 13
- Prepare for upgrade of bracex and wcmatch libraries HOT 6
- [Runtime Error] ModuleNotFoundError: No module named 'wcmatch' HOT 1
- Investigate why didSave notification is not sent if view closed immediately after saving
- Two alternative hover definitions provided: one on mouseover, the other upon keyboard shortcut HOT 6
- Not Working After 3.8 Upgrade HOT 3
- Discuss removal of some APIs HOT 3
- Allow LSP packages to customize format_completion HOT 1
- Support list of commands, provided by language servers HOT 5
- Syntax highlighting in popups, returned by 3rd party language server, not work HOT 9
- Package is not installable HOT 5
- MissingUriError: View has no URI HOT 1
- `websocket_server` installs a root logger
- Cannot install LSP on clean installation HOT 15
- Updated to LSP 2.1.0 leads to FileNotFoundError and no LSP HOT 4
- `lsp_code_actions_on_save` do not work intermittently HOT 8
- KeyError on file-watcher HOT 2
- Replace `Enum` object with it's scalar value in the LSP log panel? HOT 1
- Text selection in popups HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp.