Crates.io | ion_shell_lsp_server |
lib.rs | ion_shell_lsp_server |
version | 0.2.0 |
source | src |
created_at | 2024-04-07 10:43:29.084765 |
updated_at | 2024-04-07 10:43:29.084765 |
description | LSP server for the scripting language of the ion shell. |
homepage | |
repository | https://gitlab.redox-os.org/redox-os/ion_lsp |
max_upload_size | |
id | 1199024 |
size | 154,846 |
The following features are available to an editors via this language server for the scripting language of ion shell. These features are provided via the LSP protocol.
This LSP server provides the following language features:
Note: This LSP server currently parses every file in isolation without considering the sourcing of other files. This fact has the following consequences:
These limitation of could be fixed partially. Partially in the sense that only static sourcing could be used to analyze files sourcing other file fully. A static source uses only paths which are resolvable before runtime aka without executing the script. As soon as a dynamic source statement is encountered, certain semantic errors like using an undefined variable could not be generated without the risk of a false positive for example. Another problem is that files could source each other which results in a cycle.
These represents the following challenges to overcome:
Detect if sourcing is static or dynamic.
How to handle dynamic sourcing. Only provided full functionality if only static sourcing is used or do get sections which are static, more analyzed than dynamic sections.
How to detect cyclic sourcing and how to deal with it in the LSP analysis.
Over git
cargo install --git https://gitlab.redox-os.org/redox-os/ion_lsp ion_shell_lsp_server
Put this into your init.lua file:
vim.api.nvim_create_autocmd('FileType', {
pattern = 'ion',
callback = function()
vim.lsp.start({
name = 'ion_shell_lsp_server',
cmd = { 'ion_shell_lsp_server' },
})
end,
})
This examples assumes that the LSP server can be found under PATH variable with name "ion_shell_lsp_server".
See the changelogs
See the following guide lines
This project, all workspace members and the visual code extension are licensed under MIT License