NimPlus
Nim plugin for Sublime Text 4 with IDE like features
Details
Installs
- Total 1K
- Win 705
- Mac 209
- Linux 507
Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | Dec 22 | Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 1 | 1 | 0 | 0 | 2 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
Mac | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 0 | 1 | 0 | 0 | 1 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
NimPlus
(Formerly named SublimeNim)
Nim Programming Language plugin for Sublime Text 4
Requires version 4073 or higher.
- Q: Why not use NimLime ?
- A: NimLime dropped support for NimSuggest and Nimble. It now focuses on providing language highlighting support. The goal of NimPlus is to have IDE like support for Nim including autocompletion, type information tooltips and more (see the Features section)
We currently support Window and Linux. Other OS might work but aren't tested.
Features
- Syntax highlighting
- Highlight errors (Using
nim check
) - Show tooltips with type informations
- Goto Definition (link inside tooltip)
- Autocompletion (based on
nimsuggest
) - Shows your documentation
- Keyboard shortcuts for building and generating documentation
- Prettify your code with nimpretty
Installation
Package Control is required. Find how to install it here: https://packagecontrol.io/installation If you have other packages installed, you probably also have already installed Package Control.
- Ctrl+Shift+P
- Select
Package Control: Add repository
- Enter URL: https://github.com/vanyle/NimPlus
Install package
NimPlus
Enter
Settings, Usage and Tips
To see what NimPlus is capable of, open the Command Palette (Ctrl+Shift+P ), and type NimPlus
.
This will list most NimPlus features.
You can install the ANSIescape
package to enjoy the syntax coloring of the terminal when building.
This is optional.
Depending on how much you want Sublime to behave as an IDE or as a text editor, you can toggle the following features. You can see all the toggles inside your preference file.
Open it with: Preferences > Package Settings > NimPlus > Settings - Default
Error highlighting
Toggle with nimplus.savecheck
After saving, will check the current file for errors. See screenshot above.
Tooltips
Toggle with nimplus.hoverdescription
Will show the types and the docstring of the variable and procedure you hover over.
Auto completion
Toggle with nimplus.autocomplete
Will propose completion options based on nimsuggest
's sug
feature.
You need to enable autocompletion
in Sublime Text settings
Build shortcuts
Ctrl+B : Compile and Run the current nimble project
Ctrl+Shift+B : Compile the current nimble project
You can change these with:
Preferences > Package Settings > NimPlus > Key Bindings - Default
Possible configuration:
[
{
"keys":["ctrl+b"],
"command":"run_nim" // put run_nim or run_nimble depending on if you use nim more as a scripting tool or for big projects.
},
{
"keys":["ctrl+shift+b"],
"command":"compile_nim" // same here
},
]
When building, the result will be shown inside the Sublime Text terminal. You might want to change this behavior. The first settings controls the regular builds and the second setting controls the nimble builds. The compilation will always occur inside the Sublime Text terminal, only the run command can be customized.
// possible values:
// `[]` => Use the Sublime Text terminal (readonly)
// `["wt"]` => Use Windows Terminal
// `["start","cmd","/k"]` => Please use something more modern ...
// `["start","powershell","-Command"]` => Use Powershell
{
// other values ...
"nimplus.nim.console":["wt"],
"nimplus.nimble.console":["wt"]
}
By default, NimPlus does not use the Build System integrated into Sublime Text. Instead, NimPlus uses custom commands that perform the building. This allows us to control what terminal is used to run the command and other options.
If you prefer using Build System, comment the lines inside the Key Bindings - Default
files
to disable the Custom Sublime Nim building and check the option in:
Tools > Build System > Nim
Note that the Build System does not support nimble
.
Usage with Terminus
Terminus is a package that adds a real terminal inside Sublime Text with colored output and interaction and evverything.
If it is installed, you can run your programs inside of it instead of the default output panel with the config switch “js "nimplus.use_terminus”: true
Contributing
------------
Pull requests are **not** welcome.
I might still merge them if I feel like it thou.
Open an issue if you have a problem.