Skip to content

Instantly share code, notes, and snippets.

@tmatz
Created April 15, 2020 16:19
Show Gist options
  • Save tmatz/827f9ac94bb5f6de2cb0e56aff1a82e6 to your computer and use it in GitHub Desktop.
Save tmatz/827f9ac94bb5f6de2cb0e56aff1a82e6 to your computer and use it in GitHub Desktop.
coc.nvim custom source for .editorconfig (put in ~/.vim/autoload/coc/source/)
function! coc#source#editorconfig#init() abort
return {
\ filetypes: [ 'editorconfig' ]
\}
endfunction
function! coc#source#editorconfig#complete(opt, cb) abort
let items = [
\ 'charset',
\ 'end_of_line',
\ 'indent_size',
\ 'insert_final_newline',
\ 'insert_style',
\ 'max_line_length',
\ 'root',
\ 'tab_width',
\ 'trim_trailing_whitespace',
\ 'utf-8',
\ 'lf',
\ 'cr',
\ 'crlf',
\ 'true',
\ 'false',
\ 'off',
\ ]
call a:cb(items)
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment