Created
April 15, 2020 16:19
-
-
Save tmatz/827f9ac94bb5f6de2cb0e56aff1a82e6 to your computer and use it in GitHub Desktop.
coc.nvim custom source for .editorconfig (put in ~/.vim/autoload/coc/source/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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