- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .python-version | ||
| CHANGELOG.md | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||
| LSP-statac.sublime-commands | ||
| LSP-statac.sublime-settings | ||
| Main.sublime-menu | ||
| plugin.py | ||
| README.md | ||
| sublime-package.json | ||
LSP-statac
Statac's language server in Sublime Text, through
the LSP package. In a Statac
site, Sublime Text shows each problem statac check finds as you type,
and offers completion, hover, go to definition, find references and
fixes. When you rename a page's file, the links to it are updated.
It needs Statac 0.7.0 or later. With an earlier Statac, Sublime Text says only that the server stopped.
Installing
- Install Statac.
- In Sublime Text, run Package Control: Install Package, and install
LSP, thenLSP-statac. - Open a folder that holds a Statac site: a
statac.yamlfile, or acontentfolder.
The server starts for a file inside a site and leaves every other file alone.
Keys
Sublime Text gives hover, fixes and go to definition no key of its own. To add them, run Preferences: Key Bindings and add these lines to your own key bindings, choosing other keys if these are taken:
[
{
"keys": ["primary+k", "primary+i"],
"command": "lsp_hover",
"context": [{"key": "lsp.session_with_capability", "operand": "hoverProvider"}]
},
{
"keys": ["primary+."],
"command": "lsp_code_actions",
"context": [{"key": "lsp.session_with_capability", "operand": "codeActionProvider"}]
},
{
"keys": ["f12"],
"command": "lsp_symbol_definition",
"args": {"side_by_side": false, "force_group": true, "fallback": true, "group": -1},
"context": [
{"key": "lsp.session_with_capability", "operand": "definitionProvider"},
{"key": "auto_complete_visible", "operand": false}
]
}
]
Find references is on Shift+F12 already. To rename a page's file and update the links to it, run LSP: Rename Path, or choose LSP: Rename… on the file in the sidebar.
Settings
Sublime Text looks for statac on the path, then where Homebrew, the
install script, Cargo, Scoop and winget put it. To use another, run
Preferences: LSP-statac Settings and give its whole path:
{
"command": ["/path/to/statac", "lsp"]
}
More
Licence
MIT or Apache-2.0, at your choice: LICENSE-MIT, LICENSE-APACHE.