diff options
| author | awy <awy@awy.one> | 2025-11-14 23:43:38 +0300 |
|---|---|---|
| committer | awy <awy@awy.one> | 2025-11-14 23:43:38 +0300 |
| commit | c7a88a07b9287db9c129914483f6b3ae1ab5404c (patch) | |
| tree | 73c227c5e8519eb9135f46984e4fc067b316ed1b /.config/nvim/lsp/lwc_ls.lua | |
| download | mangoslice-c7a88a07b9287db9c129914483f6b3ae1ab5404c.tar.gz | |
init
Diffstat (limited to '.config/nvim/lsp/lwc_ls.lua')
| -rw-r--r-- | .config/nvim/lsp/lwc_ls.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/.config/nvim/lsp/lwc_ls.lua b/.config/nvim/lsp/lwc_ls.lua new file mode 100644 index 0000000..2e4ded3 --- /dev/null +++ b/.config/nvim/lsp/lwc_ls.lua @@ -0,0 +1,30 @@ +---@brief +--- +--- https://github.com/forcedotcom/lightning-language-server/ +--- +--- Language server for Lightning Web Components. +--- +--- For manual installation, utilize the official [NPM package](https://www.npmjs.com/package/@salesforce/lwc-language-server). +--- Then, configure `cmd` to run the Node script at the unpacked location: +--- +--- ```lua +--- vim.lsp.config('lwc_ls', { +--- cmd = { +--- 'node', +--- '/path/to/node_modules/@salesforce/lwc-language-server/bin/lwc-language-server.js', +--- '--stdio' +--- } +--- }) +--- ``` + +---@type vim.lsp.Config +return { + cmd = { 'lwc-language-server', '--stdio' }, + filetypes = { 'javascript', 'html' }, + root_markers = { 'sfdx-project.json' }, + init_options = { + embeddedLanguages = { + javascript = true, + }, + }, +} |