Skip to content

Navigation Menu

Sign up

Vim Neovim

CP Clermont edited this page Oct 12, 2023 · 4 revisions

neoclide/coc.nvim Configuration

In coc-settings.json opened by :CocConfig , add:

{
 "languageserver": {
 "liquid": {
 "command": "shopify",
 "args": ["theme", "language-server"],
 "filetypes": [
 "liquid"
 ],
 "rootPatterns": [
 ".theme-check.yml"
 ]
 }
 }
}

dense-analysis/ale Configuration

" in vimrc (or config/nvim/init.vim) somewhere
let g:ale_linters = {}
let g:ale_linters.liquid = ['liquid-language-server']
function! ThemeCheckGetProjectRoot(buffer) abort
 let l:project_root = ale#path#FindNearestFile(a:buffer, '.theme-check.yml')
 return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : ''
endfunction
call ale#linter#Define('liquid', {
\  'name': 'liquid-language-server',
\  'lsp': 'stdio',
\  'executable': system('which shopify | tr -d "\n" '),
\  'project_root': function('ThemeCheckGetProjectRoot'),
\  'command': '%e theme language-server',
\})

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /