windwp / nvim-ts-autotag

Use treesitter to auto close and auto rename html tag
MIT License
1.69k stars 90 forks source link

Doesn't work with html files #36

Closed StitiFatah closed 2 years ago

StitiFatah commented 2 years ago

Version : NVIM v0.6.0

OS : Archlinux

My installed plugins :

Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}  " We recommend updating the parsers on update
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install'  }
Plug 'preservim/nerdcommenter'
Plug 'vim-airline/vim-airline'
Plug 'ryanoasis/vim-devicons' 
Plug 'mattn/emmet-vim' 
Plug 'tpope/vim-eunuch' 
Plug 'wfxr/minimap.vim'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'jiangmiao/auto-pairs'
Plug 'windwp/nvim-ts-autotag'
Plug 'andymass/vim-matchup'
Plug 'ggandor/lightspeed.nvim'
Plug 'tpope/vim-surround'

I'm using the default config and It works well with .js .jsx and .tsx files but not with .html ones even when explicitly adding 'html' to filetypes. Any ideas ? Thanks in advance.

luong-komorebi commented 2 years ago

Can confirm that it is not working for html files

mgeist commented 2 years ago

Was able to get this working with :TSUpdate html which manually installed an HTML parser. Not sure if there's an automated way to do that yet, but it solved the issue for now.

StitiFatah commented 2 years ago

Was able to get this working with :TSUpdate html which manually installed an HTML parser. Not sure if there's an automate way to do that yet, but it solved the issue for now.

Can confirm it works. I rarely use bare html files and thus didn't think about installing an html parser when installing treesiter.

gegoune commented 2 years ago

You need html parser even if you are using it as embedded language (injected) in Vue, etc.

StitiFatah commented 2 years ago

You need html parser even if you are using it as embedded language (injected) in Vue, etc.

I'm mostly using JSX, which obviously doesn't need an html parser, that's why.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.