Open yash-fn opened 10 months ago
Thank you for sharing this was confusing me too! Can you share how to configure a setting this way?
I'm trying this and getting no change (the pyright config is helpfully demonstrated in the setup script)
let g:lsp_settings_filetype_python = ['ruff-lsp', 'pyright-langserver']
" Configure the Pyright and Python LSP servers
let g:lsp_settings = {
\ 'ruff-lsp': {
\ 'disabled': v:false,
\ 'initialization_options': {
\ "globalSettings": {
\ 'python': {
\ 'format': {
\ 'args': ['--unsafe-fixes']
\ }
\ }
\ }
\ }
\ },
\ 'pyright-langserver': {
\ 'disabled': v:false,
\ 'workspace_config': {
\ 'python': {
\ 'analysis': {
\ 'useLibraryCodeForTypes': v:true,
\ }
\ }
\ }
\ },
ruff-lsp global and workspace config is weird. instead of using: for workspace config:
it chooses to use:
i.e.
workspace_config
becomesinitialization_options.settings
orinitialization_options.globalSettings
Just mentioning this here for future confused users.
Thanks!