diff --git a/init.lua b/init.lua index f99a9895..47fd96b3 100644 --- a/init.lua +++ b/init.lua @@ -749,13 +749,12 @@ require('lazy').setup({ }, }, }, - pyright = { + basedpyright = { settings = { - python = { + basedpyright = { analysis = { - typeCheckingMode = 'basic', - autoSearchPaths = true, - useLibraryCodeForTypes = true, + typeCheckingMode = 'standard', + diagnosticMode = 'openFilesOnly', }, }, }, diff --git a/lua/custom/plugins/lsp_file_operations.lua b/lua/custom/plugins/lsp_file_operations.lua new file mode 100644 index 00000000..3f27b8ee --- /dev/null +++ b/lua/custom/plugins/lsp_file_operations.lua @@ -0,0 +1,13 @@ +return { + 'antosha417/nvim-lsp-file-operations', + dependencies = { 'nvim-neo-tree/neo-tree.nvim' }, + config = function() + require('lsp-file-operations').setup() + + -- Advertise file operation capabilities to all LSP servers + local file_ops_caps = require('lsp-file-operations').default_capabilities() + vim.lsp.config('*', { + capabilities = file_ops_caps, + }) + end, +} diff --git a/lua/custom/plugins/oil.lua b/lua/custom/plugins/oil.lua index 8a6d6767..c4fb1abd 100644 --- a/lua/custom/plugins/oil.lua +++ b/lua/custom/plugins/oil.lua @@ -10,5 +10,10 @@ return { view_options = { show_hidden = true, }, + lsp_file_methods = { + enabled = true, + timeout_ms = 2000, + autosave_changes = 'unmodified', + }, }, } diff --git a/lua/custom/plugins/opencode.lua b/lua/custom/plugins/opencode.lua index 90f51414..56c1346d 100644 --- a/lua/custom/plugins/opencode.lua +++ b/lua/custom/plugins/opencode.lua @@ -4,7 +4,13 @@ return { -- Recommended for `ask()` and `select()`. -- Required for `snacks` provider. ---@module 'snacks' <- Loads `snacks.nvim` types for configuration intellisense. - { 'folke/snacks.nvim', opts = { input = {}, picker = {}, terminal = {} } }, + { + 'folke/snacks.nvim', + opts = { input = {}, picker = {}, terminal = {}, rename = {} }, + keys = { + { 'cR', function() Snacks.rename.rename_file() end, desc = 'Rename File (LSP)' }, + }, + }, }, config = function() local function redact_sensitive(value)