:checkhealth LanguageClient?health#LanguageClient#check
========================================================================
- OK: binary found: /home/kristijan/.config/nvim/pack/packager/start/LanguageClient-neovim/bin/languageclient
- OK: languageclient 0.1.124
Language server is not started for jsx filetypes automatically. I need to run LanguageClientStart manually each time.
nvim --version or vim --version): NVIM v0.3.2-devgit rev-parse --short HEAD): b7fcc7ebin/languageclient --version): wrote aboveInstall steps:
git clone https://github.com/autozimu/LanguageClient-neovim ~/.config/nvim/pack/packager/start/LanguageClient-neovimcd ~/.config/nvim/pack/packager/start/LanguageClient-neovim && bash install.shgit clone https://github.com/mxw/vim-jsx ~/.config/nvim/pack/packager/start/vim-jsxnpm install -g javascript-typescript-langserver" minimum init.vim
" packages loaded automatically from pack folder
let g:LanguageClient_serverCommands = {
\ 'javascript': ['javascript-typescript-stdio'],
\ 'javascript.jsx': ['javascript-typescript-stdio'],
\ }
Steps to reproduce the behavior:
my-js-project and cd into itimport { Join } from './included';
const MyComponent = () => (
<div>{Join('test', 'testing')}</div>
)
export default MyComponent;
export const Join = (a ,b) => [a, b].join(' ');
index.jsx, go to Join with cursor:call LanguageClient#textDocument_definition()I get error Language server is not running for: javascript.jsx
Should jump to the first line to Join
issue is fixed either by adding packadd vim-jsx to the init.vim at the beginning, or starting the server manually.
I think that general issue is that vim-jsx plugin is an "after" plugin, and it's autocmd to set the filetype is done after the languageclient init. This shouldn't be an issue.
Thanks for reporting.
Unfortunately this change broke everything for me. None of the language servers starts automatically, even for the things that worked before (python, go, regular js). Here's my server commands:
let g:LanguageClient_serverCommands = {
\ 'javascript': ['javascript-typescript-stdio'],
\ 'javascript.jsx': ['javascript-typescript-stdio'],
\ 'typescript': ['javascript-typescript-stdio'],
\ 'go': ['go-langserver', '-gocodecompletion', '-func-snippet-enabled=false'],
\ 'python': ['pyls'],
\ }
I noticed that autocmd FileType is not firing for me at all, until i do filetype detect. But that still doesn't start the server.
I know that vim-plug does some manual triggering of filetype detection, and that why it works with it.
Also the solution by adding packadd that i mentioned above is also not working.
I did some research and found this issue on neovim https://github.com/neovim/neovim/issues/4684
I tried both suggestions from this comment https://github.com/neovim/neovim/issues/4684#issuecomment-273124331 , but none of them work.
I have the same issue, but, manually starting the LanguageClient with :LanguageClientStart works.
That's probably caused by a recent change that caused a mismatch between binary side and vimscript side.
Please try out the latest release.
Updated to the latest release and it works now!
Works for me also, thanks!
Most helpful comment
Unfortunately this change broke everything for me. None of the language servers starts automatically, even for the things that worked before (python, go, regular js). Here's my server commands:
I noticed that autocmd
FileTypeis not firing for me at all, until i dofiletype detect. But that still doesn't start the server.I know that vim-plug does some manual triggering of filetype detection, and that why it works with it.
Also the solution by adding
packaddthat i mentioned above is also not working.I did some research and found this issue on neovim https://github.com/neovim/neovim/issues/4684
I tried both suggestions from this comment https://github.com/neovim/neovim/issues/4684#issuecomment-273124331 , but none of them work.