mattn / emmet-vim

emmet for vim: http://emmet.io/
http://mattn.github.io/emmet-vim
MIT License
6.42k stars 410 forks source link

How to enable custom setting for emmet-vim in NeoVim using Vim Plug #536

Open rshageer opened 2 years ago

rshageer commented 2 years ago

I'm using nvim and have loaded mattn/emmet-vim with vim plug. It works well with all files it's supposed to.

However, for Jekyll's liquid files I'd like to use the same setup as html.

For some reason, when the file is detected as "liquid" emmet simply does not work, no suggestions, keybindings dont suggest anything,

How can I get emmet to work with liquid files?

My .vimrc has the following (excepts):

  3 call plug#begin('~/.vim/plugged')
  4 
  5   Plug 'morhetz/gruvbox'
  6   Plug 'junegunn/fzf', {'do': { ->fzf#install()}}
  7   Plug 'junegunn/fzf.vim'
  8   Plug 'neoclide/coc.nvim', {'branch': 'release'}
  9   Plug 'scrooloose/nerdtree'
 10   Plug 'Xuyuanp/nerdtree-git-plugin'
 11   Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
 12   Plug 'vim-airline/vim-airline'
 13   Plug 'vim-airline/vim-airline-themes'
 14   Plug 'preservim/nerdcommenter'
 15   Plug 'tpope/vim-fugitive'
 16   Plug 'ryanoasis/vim-devicons'
 17   Plug 'pangloss/vim-javascript'
 18   Plug 'leafgarland/typescript-vim'
 19   Plug 'maxmellon/vim-jsx-pretty'
 20   Plug 'mattn/emmet-vim'
 21   Plug 'tpope/vim-liquid'
 22 
 23 call plug#end()
....
 49 " EMMET-VIM {{{
 50   let g:user_emmet_settings = { 
 51   \  'liquid' : { 
 52   \    'extends' : 'html', 
 53   \  }, 
 54   \} 
 55 "}}}
S0AndS0 commented 1 year ago

Yo that g:user_emmet_settings configuration almost totally did the trick for me!... Only thing that I had to add was appending the liquid file-type to the relevant autocmd, eg.

~/.vimrc (snip)

""
" Emmet configurations
let g:user_emmet_install_global = 0
autocmd FileType html,liquid,css EmmetInstall