Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rshageer opened this issue Mar 20, 2022 · 1 comment
Open

Comments

@rshageer
Copy link

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
Copy link

S0AndS0 commented May 16, 2023

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

S0AndS0 added a commit to S0AndS0/configure-vim that referenced this issue May 16, 2023
> Much thanks to `rshageer` of GitHub for providing an almost fully
> functional example within `mattn/emmet-vim#536` Issue!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants