diff --git a/vimrc.plugins.vim b/vimrc.plugins.vim index 4d28449..a9bf8d7 100644 --- a/vimrc.plugins.vim +++ b/vimrc.plugins.vim @@ -218,7 +218,7 @@ runtime macros/matchit.vim "{{{ let g:lsp_signs_enabled = 1 let g:lsp_signs_error = {'text': '>>'} -let g:lsp_signs_warning = {'text': '>>'} +let g:lsp_signs_warning = {'text': '>'} let g:lsp_signs_information = {'text': '--'} let g:lsp_signs_hint = {'text': '--'} let g:lsp_diagnostics_echo_cursor = 1 @@ -249,10 +249,35 @@ augroup User lsp_setup \ 'whitelist': ['python'], \ }) endif + + if executable('typescript-language-server') + au User lsp_setup call lsp#register_server({ + \ 'name': 'typescript-language-server', + \ 'cmd': { server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']}, + \ 'root_uri': { server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_directory(lsp#utils#get_buffer_path(), '.git/..'))}, + \ 'whitelist': ['typescript', 'javascript', 'javascript.jsx'] + \ }) + endif augroup END "}}} +" ALE +"{{{ +nnoremap ne :lnext +nnoremap pe :lprev + +let g:ale_sign_error = '>>' +let g:ale_sign_warning = '>' +let g:ale_sign_column_always = 1 + +" let g:ale_linters = {'scss': ['stylelint'], 'javascript': ['eslint'], 'php':['php'], 'html':['htmlhint'], 'python': [], 'vue': []} +let g:ale_linters = {'scss': ['stylelint'], 'javascript': [], 'php':['php'], 'html':['htmlhint'], 'python': [], 'vue': []} +" let g:ale_linters_explicit = 1 +let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix' +let g:ale_fixers = {'javascript': ['eslint']} +"}}} + " vim-easy-align "{{{ xmap ga (EasyAlign) @@ -330,21 +355,6 @@ augroup fixhighlighting augroup END "}}} -" ALE -"{{{ -nnoremap ne :lnext -nnoremap pe :lprev - -let g:ale_sign_error = '>>' -let g:ale_sign_warning = '>' -let g:ale_sign_column_always = 1 - -let g:ale_linters = {'scss': ['stylelint'], 'javascript': ['eslint'], 'php':['php'], 'html':['htmlhint'], 'python': [], 'vue': []} -" let g:ale_linters_explicit = 1 -let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix' -let g:ale_fixers = {'javascript': ['eslint']} -"}}} - " ultisnips "{{{ nnoremap ul :call ListUltisnips()