Neovim KCL Extension
Install the kcl-language-server from the binary.
Don't forget to ensure it is in your
$PATH
, check the install location through the following command.
which kcl-language-server
Simply call :MasonInstall kcl
to install the kcl-language-server
:MasonInstall kcl
Install the plugin using your preferred plugin manager such as:
use 'kcl-lang/kcl.nvim'
{
"kcl-lang/kcl.nvim",
ft = {
"kcl",
},
},
You may want to adjust your lspconfig.. for example:
local util = require("lspconfig.util")
return {
cmd = { "kcl-language-server" },
filetypes = { "kcl" },
root_dir = util.root_pattern(".git"),
}
- Syntax Highlight
- Code folding
- Quick Comment
- Diagnostics: Warnings and errors in KCL file.
Insert mode:
Ctrl+\
Toggle comment.
Normal mode:
zC
Close all folds under the cursor recursively.
zO
Open all folds under the cursor recursively.
zM
Close all folds.
zR
Open all folds.