Overview
Svelte for (Neo)Vim is a fork from the svelte-vscode project that provides rich intellisense for Svelte components in (Neo)Vim. It utilizes the Svelte language server to enhance the development experience.
Features
- Diagnostic messages: Provides feedback and error messages for Svelte files.
- Support for svelte preprocessors: Works well with preprocessors that provide source maps.
- Formatting: Offers formatting support using the prettier-plugin-svelte.
- Hover info: Displays hover information for Svelte components.
- Autocompletions: Provides autocompletion suggestions while editing Svelte files.
- Go to definition: Allows users to navigate to the definition of a Svelte component.
- TypeScript Plugin: Includes a TypeScript plugin that provides intellisense within JavaScript and TypeScript files for interacting with Svelte files.
- Settings: Offers various settings to toggle specific features of the extension.
Installation
- Install the syntax plugin to get syntax highlight and the correct filetype. For example, you can use leafOfTree/vim-svelte-plugin.
- If you have added “files.associations”: {"*.svelte": “html” } to your CoC settings, remove it.
- If you want to use TypeScript/SCSS/Less, refer to the documentation.
Summary
Svelte for (Neo)Vim is a helpful extension that provides improved development capabilities for Svelte components in the (Neo)Vim editor. With features such as diagnostic messages, formatting support, autocompletions, and more, developers can enjoy a smoother and more efficient coding experience.