feat(pyright): better defaults
This commit is contained in:
parent
34e827fd05
commit
bfaee95d02
3 changed files with 10 additions and 2 deletions
|
@ -28,7 +28,7 @@ function M.on_attach(client, bufnr)
|
||||||
vim.cmd(([[
|
vim.cmd(([[
|
||||||
augroup CosmicFormat
|
augroup CosmicFormat
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd BufWritePre %s lua vim.lsp.buf.formatting_sync(nil, 2000)
|
autocmd BufWritePre %s lua vim.lsp.buf.formatting_sync(nil, 3000)
|
||||||
augroup end
|
augroup end
|
||||||
]]):format(format_filetypes))
|
]]):format(format_filetypes))
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,6 +19,15 @@ local function get_python_path(workspace)
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
settings = {
|
||||||
|
python = {
|
||||||
|
analysis = {
|
||||||
|
typeCheckingMode = 'off',
|
||||||
|
useLibraryCodeForTypes = true,
|
||||||
|
completeFunctionParens = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
before_init = function(_, config)
|
before_init = function(_, config)
|
||||||
config.settings.python.pythonPath = get_python_path(config.root_dir)
|
config.settings.python.pythonPath = get_python_path(config.root_dir)
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -41,7 +41,6 @@ local opts_vertical = {
|
||||||
|
|
||||||
local opts_flex = {
|
local opts_flex = {
|
||||||
layout_strategy = 'flex',
|
layout_strategy = 'flex',
|
||||||
results_title = false,
|
|
||||||
layout_config = {
|
layout_config = {
|
||||||
width = 0.7,
|
width = 0.7,
|
||||||
height = 0.7,
|
height = 0.7,
|
||||||
|
|
Loading…
Add table
Reference in a new issue