vim-lsp-settings
vim-lsp-settings copied to clipboard
Automatically starts the pylsp in Python install
The plugin starts python310/Scripts/pylsp, which prevents the LSP I installed with :LspInstall from running. I have to :LspStopServer pylsp to use pyright. Python 3.10,7 Vim 9.0.
Do you want to start pylsp and pyright both? Then
let g:lsp_settings_filetype_python = ['pylsp', 'pyright']
Thank you, but I don’t want to start pylsp at all. It starts automatically when I have vim-lsp-settings installed (as a git submodule in vimfiles/pack/plugins/start if that matters).
Sent from my iPhone
On Sep 11, 2022, at 01:13, mattn @.***> wrote:
Do you want to start pylsp and pyright both? Then
let g:lsp_settings_filetype_python = ['pylsp', 'pyright']
— Reply to this email directly, view it on GitHubhttps://github.com/mattn/vim-lsp-settings/issues/617#issuecomment-1242895623, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADAKIE3JHRMFJK2TNMNSCVLV5VZ7FANCNFSM6AAAAAAQJTAP5A. You are receiving this because you authored the thread.Message ID: @.***>
- blank vimrc
- two plugins: vim-lsp and vim-lsp-settings
- nothing in ~\AppData\Local\vim-lsp-settings\servers
- fresh Python 3.10.6 install
Start GVim, open a Python file, pylsp is running
:PlsInstall pyright-langserver
Vimrc =
if executable('pyright')
"" pip install python-language-server
au User lsp_setup call lsp#register_server({
\ 'name': 'pyright',
\ 'cmd': {server_info->['pyright-langserver', '--stdio']},
\ 'allowlist': ['python'],
\ })
endif
Restart GVim, open a Python file, both pylsp and pyright-langserver are running.
Then, just set
let g:lsp_settings_filetype_python = ['pyright']
Thank you very much.
Sent from my iPhone
On Sep 11, 2022, at 09:05, mattn @.***> wrote:
Then, just set
let g:lsp_settings_filetype_python = ['pyright']
— Reply to this email directly, view it on GitHubhttps://github.com/mattn/vim-lsp-settings/issues/617#issuecomment-1242972322, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADAKIE5DFQEXAGMB3F7EH5DV5XRIZANCNFSM6AAAAAAQJTAP5A. You are receiving this because you authored the thread.Message ID: @.***>
Then, just set
let g:lsp_settings_filetype_python = ['pyright']
should be 'pyright-langserver' instead of 'pyright' in the braces?
should be 'pyright-langserver' instead of 'pyright' in the braces?
Yes, that is the better method. Empty vimrc except let g:lsp_settings_filetype_python = ['pyright-langserver']
will result in the Please do :LspInstallServer ...
prompt and tidy installation in g:lsp_settings_servers_dir
To summarize:
let g:lsp_settings_filetype_python = ['pyright-langserver']
plus any mappings or display settings you want will be enough to get vim-lsp running nicely with pyright.