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 95
Vim Neovim
Charles-Philippe Clermont edited this page Dec 1, 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
neovim/nvim-lspconfig Configuration
Add the following initialization code to your init.vim
:
lua << EOF
require'lspconfig'.theme_check.setup{}
EOF
More details in nvim-lspconfig's CONFIG.md
neoclide/coc.nvim Configuration
In coc-settings.json
opened by :CocConfig
, add:
{
"languageserver": {
"liquid": {
"command": "theme-check-language-server",
"filetypes": [
"liquid"
],
"settings": {
"themeCheck": {
"checkOnOpen": true,
"checkOnChange": true,
"checkOnSave": true,
}
},
"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',
\})