Skip to content

Commit

Permalink
Merge pull request #60 from olrtg/add-support-for-js-pug-svelte-vue
Browse files Browse the repository at this point in the history
feat: add support for `javascript`, `pug`, `svelte` and `vue` files
  • Loading branch information
aca authored Apr 11, 2023
2 parents d644b4e + 4cdeed4 commit 282cbdd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ capabilities.textDocument.completion.completionItem.snippetSupport = true
lspconfig.emmet_ls.setup({
-- on_attach = on_attach,
capabilities = capabilities,
filetypes = { 'html', 'typescriptreact', 'javascriptreact', 'css', 'sass', 'scss', 'less' },
filetypes = { "css", "eruby", "html", "javascript", "javascriptreact", "less", "sass", "scss", "svelte", "pug", "typescriptreact", "vue" },
init_options = {
html = {
options = {
Expand All @@ -40,5 +40,5 @@ lspconfig.emmet_ls.setup({

##### Supported Filetypes

- `html`, `typescriptreact`, `javascriptreact`, `css`, `sass`, `scss` and `less` filetypes are fully supported.
- `html`, `pug`, `typescriptreact`, `javascript`, `javascriptreact`, `svelte`, `vue`, `css`, `sass`, `scss` and `less` filetypes are fully supported.
- Any other filetype is treated as `html`.
6 changes: 5 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,18 @@ const markupIdentifierOverrides = {
// Identifiers not in stylesheetIdentifiers are treated as markup.
// Markup languages are treated as html syntax by default.
// So html, blade, razor and the like don't need to be listed.
javascript: 'js',
javascriptreact: 'jsx',
pug: 'pug',
svelte: 'svelte',
typescriptreact: 'jsx',
vue: 'vue',
} as { [key: string]: string | undefined };
const stylesheetIdentifiers = [
'css',
'sass',
'scss',
'less'
'less',
];

connection.onCompletion(
Expand Down

0 comments on commit 282cbdd

Please sign in to comment.