This repository has been archived by the owner on Jul 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
Vim Neovim
Charles-Philippe Clermont edited this page May 5, 2021
·
7 revisions
Theme-Check is implemented as an LSP server. This means that it integrates pretty well with any editor that has an LSP Client.
If installed via homebrew, the path to the language server should be on your $PATH as theme-check-liquid-server
neoclide/coc.nvim Configuration
In coc-settings.json
opened by :CocConfig
, add:
{
"languageserver": {
"liquid": {
"command": "theme-check-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 = ['theme-check-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': 'theme-check-language-server',
\ 'lsp': 'stdio',
\ 'executable': system('which theme-check-language-server | tr -d "\n" '),
\ 'project_root': function('ThemeCheckGetProjectRoot'),
\ 'command': '%e',
\})