Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSP servers not connecting, Windows 11 #1540

Closed
kevinlam03 opened this issue Mar 2, 2024 · 1 comment
Closed

LSP servers not connecting, Windows 11 #1540

kevinlam03 opened this issue Mar 2, 2024 · 1 comment

Comments

@kevinlam03
Copy link

I ran :PlugInstall and can see that the lsp servers are installed and registered by the log message:

["lsp#register_server","server registered","typescript-language-server"]
["s:on_text_document_did_open()",1,"typescript","/c/Users/lamk5/Downloads","file:///C:/Users/lamk5/Downloads/ex.ts"].

However, the server never starts up afterwards. :LspStatus shows typescript-language-server: not running. What could be going wrong? This is all I have in my ~/_vimrc

filetype plugin indent on
syntax on
color desert

call plug#begin('~/.vim/autoload/')

Plug 'prabirshrestha/vim-lsp'
Plug 'mattn/vim-lsp-settings'

call plug#end()


function! s:on_lsp_buffer_enabled() abort
    setlocal omnifunc=lsp#complete
endfunction

augroup lsp_install
    au!
    " call s:on_lsp_buffer_enabled only for languages that has the server registered.
    autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
augroup END
let g:lsp_log_verbose = 1
let g:lsp_log_file = expand('~/vim-lsp.log')
@kevinlam03
Copy link
Author

I was running vim from Git Bash, and I guess that it was screwing with the system finding my files. I downloaded Vim from the official site for Windows, then moved my ~/.vim stuff to ~/vimfiles, which is what Windows uses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant