Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coc-extensions/coc-svelte
svelte support for (Neo)Vim
https://github.com/coc-extensions/coc-svelte
autocomplete lsp neovim svelte vim
Last synced: 29 days ago
JSON representation
svelte support for (Neo)Vim
- Host: GitHub
- URL: https://github.com/coc-extensions/coc-svelte
- Owner: coc-extensions
- License: mit
- Created: 2019-09-18T13:19:06.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-08T10:15:45.000Z (about 1 year ago)
- Last Synced: 2024-05-28T13:20:29.037Z (7 months ago)
- Topics: autocomplete, lsp, neovim, svelte, vim
- Language: TypeScript
- Size: 202 KB
- Stars: 175
- Watchers: 5
- Forks: 24
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-svelte - coc-svelte - Syntax highlighting and support for (Neo)Vim. (Dev Tools / Editors)
README
# Svelte for (Neo)Vim
> fork from [svelte-vscode](https://github.com/sveltejs/language-tools/tree/master/packages/svelte-vscode).
Provides rich intellisense for Svelte components in (neo)vim, utilising the [svelte language server](https://github.com/sveltejs/language-tools/tree/master/packages/language-server).
## Install
``` vim
:CocInstall coc-svelte
```> You have to install syntax plugin to get syntax highlight and get right filetype, for example `leafOfTree/vim-svelte-plugin`
## Setup
If you added `"files.associations": {"*.svelte": "html" }` to your CoC settings, remove it.
Do you want to use TypeScript/SCSS/Less/..? [See the docs](/docs/README.md#language-specific-setup).
## Features
You can expect the following within Svelte files:
- Diagnostic messages
- Support for svelte preprocessors that provide source maps
- Formatting (via [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte))
- Hover info
- Autocompletions
- Go to definitionThe extension also comes packaged with a TypeScript plugin, which when activated provides intellisense within JavaScript and TypeScript files for interacting with Svelte files.
##### `svelte.plugin.XXX`
Settings to toggle specific features of the extension. The full list of all settings [is here](https://github.com/sveltejs/language-tools/blob/master/packages/language-server/README.md#List-of-settings).
### Usage with Yarn 2 PnP
1. Run `yarn add -D svelte-language-server` to install svelte-language-server as a dev dependency
2. Run `yarn dlx @yarnpkg/pnpify --sdk vim` to generate or update the Vim/Yarn integration SDKs.
3. Set the `svelte.language-server.ls-path` setting in your user configuration, pointing it to the workspace-installed language server.
4. Restart vim.
5. Commit the changes to `.yarn/sdks`