Skip to content

Commit 107c245

Browse files
docs: update configs.md
skip-checks: true
1 parent d51b2c9 commit 107c245

File tree

2 files changed

+104
-4
lines changed

2 files changed

+104
-4
lines changed

doc/configs.md

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Nvim by running `:help lspconfig-all`.
1313
- [angularls](#angularls)
1414
- [ansiblels](#ansiblels)
1515
- [antlersls](#antlersls)
16+
- [apex_ls](#apex_ls)
1617
- [arduino_language_server](#arduino_language_server)
1718
- [asm_lsp](#asm_lsp)
1819
- [ast_grep](#ast_grep)
@@ -703,6 +704,59 @@ Default config:
703704

704705
---
705706

707+
## apex_ls
708+
709+
https://github.com/forcedotcom/salesforcedx-vscode
710+
711+
Language server for Apex.
712+
713+
For manual installation, download the JAR file from the [VSCode
714+
extension](https://github.com/forcedotcom/salesforcedx-vscode/tree/develop/packages/salesforcedx-vscode-apex) and adjust the `apex_jar_path` appropriately.
715+
716+
```lua
717+
vim.lsp.config('apex_ls', {
718+
apex_jar_path = '/path/to/apex-jorje-lsp.jar',
719+
apex_enable_semantic_errors = false, -- Whether to allow Apex Language Server to surface semantic errors
720+
apex_enable_completion_statistics = false, -- Whether to allow Apex Language Server to collect telemetry on code completion usage
721+
}
722+
```
723+
724+
Example configuration using Mason:
725+
726+
```lua
727+
vim.lsp.config('apex_ls', {
728+
apex_jar_path = vim.fn.stdpath('data') .. '/mason/share/apex-language-server/apex-jorje-lsp.jar',
729+
}
730+
```
731+
732+
For a complete experience, you may need to ensure the treesitter parsers for 'apex' are installed (:TSInstall apex) as well as configure the filetype for apex (*.cls) files:
733+
734+
```lua
735+
vim.filetype.add({
736+
pattern = {
737+
['.*/*.cls'] = 'apex',
738+
},
739+
})
740+
```
741+
742+
Snippet to enable the language server:
743+
```lua
744+
vim.lsp.enable('apex_ls')
745+
```
746+
747+
Default config:
748+
- `cmd`: [../lsp/apex_ls.lua:37](../lsp/apex_ls.lua#L37)
749+
- `filetypes` :
750+
```lua
751+
{ "apex", "apexcode" }
752+
```
753+
- `root_markers` :
754+
```lua
755+
{ "sfdx-project.json" }
756+
```
757+
758+
---
759+
706760
## arduino_language_server
707761

708762
https://github.com/arduino/arduino-language-server
@@ -2346,11 +2400,11 @@ Default config:
23462400
{
23472401
editorInfo = {
23482402
name = "Neovim",
2349-
version = "0.12.0-dev+g63ece2b151"
2403+
version = "0.12.0-dev+gb756a6165a"
23502404
},
23512405
editorPluginInfo = {
23522406
name = "Neovim",
2353-
version = "0.12.0-dev+g63ece2b151"
2407+
version = "0.12.0-dev+gb756a6165a"
23542408
}
23552409
}
23562410
```

doc/configs.txt

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,52 @@ Default config:
259259
{ "composer.json" }
260260
<
261261

262+
------------------------------------------------------------------------------
263+
apex_ls
264+
265+
https://github.com/forcedotcom/salesforcedx-vscode
266+
267+
Language server for Apex.
268+
269+
For manual installation, download the JAR file from the [VSCode
270+
extension](https://github.com/forcedotcom/salesforcedx-vscode/tree/develop/packages/salesforcedx-vscode-apex) and adjust the `apex_jar_path` appropriately.
271+
272+
```lua
273+
vim.lsp.config('apex_ls', {
274+
apex_jar_path = '/path/to/apex-jorje-lsp.jar',
275+
apex_enable_semantic_errors = false, -- Whether to allow Apex Language Server to surface semantic errors
276+
apex_enable_completion_statistics = false, -- Whether to allow Apex Language Server to collect telemetry on code completion usage
277+
}
278+
```
279+
280+
Example configuration using Mason:
281+
>lua
282+
vim.lsp.config('apex_ls', {
283+
apex_jar_path = vim.fn.stdpath('data') .. '/mason/share/apex-language-server/apex-jorje-lsp.jar',
284+
}
285+
286+
For a complete experience, you may need to ensure the treesitter parsers for 'apex' are installed (:TSInstall apex) as well as configure the filetype for apex (*.cls) files:
287+
288+
```lua
289+
vim.filetype.add({
290+
pattern = {
291+
['.*/*.cls'] = 'apex',
292+
},
293+
})
294+
```
295+
296+
Snippet to enable the language server: >lua
297+
vim.lsp.enable('apex_ls')
298+
299+
300+
Default config:
301+
- cmd (use "gF" to view): ../lsp/apex_ls.lua:37
302+
- filetypes: >lua
303+
{ "apex", "apexcode" }
304+
- root_markers: >lua
305+
{ "sfdx-project.json" }
306+
<
307+
262308
------------------------------------------------------------------------------
263309
arduino_language_server
264310

@@ -1518,11 +1564,11 @@ Default config:
15181564
{
15191565
editorInfo = {
15201566
name = "Neovim",
1521-
version = "0.12.0-dev+g63ece2b151"
1567+
version = "0.12.0-dev+gb756a6165a"
15221568
},
15231569
editorPluginInfo = {
15241570
name = "Neovim",
1525-
version = "0.12.0-dev+g63ece2b151"
1571+
version = "0.12.0-dev+gb756a6165a"
15261572
}
15271573
}
15281574
- on_attach (use "gF" to view): ../lsp/copilot.lua:79

0 commit comments

Comments
 (0)