LSP-nimlangserver
A convenience package for the official Nim language server.
Details
Installs
- Total 315
- Win 117
- Mac 57
- Linux 141
Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 2 | 0 | 0 | 7 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |
Mac | 0 | 1 | 0 | 0 | 0 | 1 | 3 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 3 | 0 | 1 | 1 | 0 | 4 | 0 | 2 | 0 | 1 | 1 | 2 | 0 | 2 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
Readme
- Source
- raw.githubusercontent.com
LSP-nimlangserver
A helper package that manages the nimlangserver language server.
Installation
Install the following packages via Package Control: 1. LSP 2. LSP-nimlangserver 3. Nim for syntax highlighting. 4. Debugger for Debugging Nim programs. 5. Terminus for running debugger tasks.
Configuration
You can edit the global settings by opening the Preferences: LSP-nimlangserver Settings
from the Command Palette.
You can also have a project-specific configuration. Run the Project: Edit Project
from the Command Palette and edit the following in the settings
object.
{
// folders: [
// ...
// ]
"settings": {
"LSP": {
"nimlangserver": {
"settings": {
//Setting-here
}
}
}
}
}
Applicable Selectors
This language server operates on views with the source.nim
base scope.
Server Management
If the "binary"
setting is set to a non-empty string (the default), then it
will try to find the server binary in your system.
If it fails, then it will prompt you to download it from Github.
The server binary is automatically downloaded to $CACHE/Package Storage/LSP-nimlangserver
.
Debugging
The Debugger package enables debugging Nim programs (among others). Some setup is required however.
Setting Up
- Read the README
- The adapter to install is lldb.
- Example configurations for debugging the current file:
{
// folders: [
// ...
// ]
"debugger_configurations":
[
{
"name": "Launch",
"program": "${file_path}/${file_base_name}",
"pre_debug_task": "Nim: compile for debugging",
// "preRunCommands": ["command script import --allow-reload \"<PATH_TO_NIM_INSTALLATION_DIR>/tools/debug/nimlldb.py\""] // improves values representation (but may be buggy).
"args": [],
"cwd": "${file_path}"
},
],
"debugger_tasks": [
{
"name": "Nim: compile for debugging",
"shell_cmd": "nim c -g ${file}",
"file_regex": "^(.+.nim)\\((\\d+), (\\d+)\\) (.*)",
"line_regex": "Error:"
}
]
}
- You may also define tasks and configurations globally:
- Run
Preferences: Debugger Settings
from the command palette. - Add the task or configuration to the
global_debugger_tasks
or theglobal_debugger_configuration
settings respectively.
- Run