Skip to content

Question: Disable emmet withing the script tag. #9

@cjnucette

Description

@cjnucette

Hi, I don't if this is a bug, but when writing javascript within the script tag, it tries to turn whatever I'm writing into a tag. Is there a way to disable it only within the `script' tag?
It happens with the 'style' tag as well. btw.

I have it configured as a nvim-lsp-installer custom server:

    local lspconfig = require('lspconfig')
    local configs = require('lspconfig.configs')
    local servers = require('nvim-lsp-installer.servers')
    local server = require('nvim-lsp-installer.server')
    local path = require('nvim-lsp-installer.path')
    local npm = require('nvim-lsp-installer.installers.npm')
    
    local server_name = 'ls_emmet'
    
    if not configs.ls_emmet then
      configs.ls_emmet = {
        default_config = {
          filetypes = { 'html', 'css', 'scss', 'sass', 'javascript', 'javascriptreact', 'typescript', 'typescriptreact' },
          root_dir = function()
            return vim.loop.cwd()
          end,
          settings = {},
        },
      }
    end
    
    local root_dir = server.get_server_root_path(server_name)
    
    local installer = npm.packages({ 'ls_emmet' })
    
    local ls_emmet = server.Server:new({
      name = server_name,
      root_dir = root_dir,
      installer = installer,
      default_options = {
        cmd = { path.concat({root_dir, 'node_modules', '.bin', 'ls_emmet'}), '--stdio' },
      },
    })
    
    servers.register(ls_emmet)

Thanks, great language server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions