emmet icon indicating copy to clipboard operation
emmet copied to clipboard

Question: Disable emmet withing the script tag.

Open cjnucette opened this issue 3 years ago • 1 comments

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.

cjnucette avatar Feb 10 '22 14:02 cjnucette

Let me think about this.

pedro757 avatar Feb 14 '22 03:02 pedro757