From 3eda45645887b52e93e7b545e5e9644f2755d593 Mon Sep 17 00:00:00 2001 From: huyjaky Date: Sun, 26 Oct 2025 16:37:04 +0700 Subject: [PATCH] Improve perform --- lua/plugins/cmps.lua | 21 ++++++++++++------ .../configs/lsp/config/basedpyright.lua | 7 +++--- lua/plugins/configs/lsp/config/pyright.lua | 22 +++++++------------ lua/plugins/disabled.lua | 2 ++ lua/plugins/none-ls.lua | 2 -- 5 files changed, 28 insertions(+), 26 deletions(-) diff --git a/lua/plugins/cmps.lua b/lua/plugins/cmps.lua index 5e696ad..fd75be6 100644 --- a/lua/plugins/cmps.lua +++ b/lua/plugins/cmps.lua @@ -9,7 +9,6 @@ return { { "Saghen/blink.cmp", opts = { - keymap = { preset = "default", [""] = false, @@ -19,26 +18,34 @@ return { term = { enabled = false, }, + source = { + providers = { + snippets = { + opts = { + friendly_snippets = { + enable = false, + }, + } + } + } + }, completion = { list = { selection = { preselect = true, -- auto_insert = true, }, - inlay_hints = { - enabled = false, - in_insert = false, - } }, ghost_text = { enabled = false, }, menu = { - auto_show = function(ctx) return ctx.mode ~= "cmdline" end, + auto_show = true, + auto_show_delay_ms = 0, draw = { columns = { { "kind_icon", "label", gap = 1 }, - { "kind", gap = 1}, + { "kind", gap = 1 }, }, }, }, diff --git a/lua/plugins/configs/lsp/config/basedpyright.lua b/lua/plugins/configs/lsp/config/basedpyright.lua index 1cb98af..f06478c 100644 --- a/lua/plugins/configs/lsp/config/basedpyright.lua +++ b/lua/plugins/configs/lsp/config/basedpyright.lua @@ -9,15 +9,16 @@ return { disableLanguageServices = false, disableOrganizeImports = true, disableTaggedHints = true, + openFilesOnly = true, analysis = { autoSearchPath = true, - useLibraryCodeForTypes = true, + useLibraryCodeForTypes = false, logLevel = "Trace", - typeCheckingMode = "standard", + typeCheckingMode = "basic", deprecateTypingAliases = false, + diagnosticMode = "openFilesOnly", inlayHints = { variableTypes = true, - -- functionReturnTypes = true, genericTypes = true, callArgumentNames = true, }, diff --git a/lua/plugins/configs/lsp/config/pyright.lua b/lua/plugins/configs/lsp/config/pyright.lua index 4998bbd..8c43be0 100644 --- a/lua/plugins/configs/lsp/config/pyright.lua +++ b/lua/plugins/configs/lsp/config/pyright.lua @@ -1,26 +1,20 @@ return { - before_init = function(_, c) - if not c.settings then - c.settings = {} - end - if not c.settings.python then - c.settings.python = {} - end - c.settings.python.pythonPath = vim.fn.exepath("python") - end, + before_init = function(_, c) + if not c.settings then c.settings = {} end + if not c.settings.python then c.settings.python = {} end + c.settings.python.pythonPath = vim.fn.exepath "python3" + end, settings = { pyright = { disableLanguageServices = false, disableOrganizeImports = true, analysis = { - -- diagnosticMode = "openFilesOnly", - typeCheckingMode = "standard", + diagnosticMode = "openFilesOnly", + typeCheckingMode = "basic", autoSearchPath = true, -- diagnosticSeverityOverrides = false, - logLevel = "Trace", + logLevel = "Error", }, }, - -- python = { - -- }, }, } diff --git a/lua/plugins/disabled.lua b/lua/plugins/disabled.lua index 791e9d9..c1a1e35 100644 --- a/lua/plugins/disabled.lua +++ b/lua/plugins/disabled.lua @@ -11,6 +11,8 @@ return { { "JoosepAlviste/nvim-ts-context-commentstring", enabled = false }, { "windwp/nvim-ts-autotag", enabled = false }, + { "ray-x/lsp_signature.nvim", enabled = false }, + -- Disabled development plugins { "mfussenegger/nvim-dap", enabled = false }, { "jay-babu/mason-nvim-dap.nvim", enabled = false }, diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua index cc59816..7bec093 100644 --- a/lua/plugins/none-ls.lua +++ b/lua/plugins/none-ls.lua @@ -10,8 +10,6 @@ return { opts = function(_, opts) local null_ls = require("null-ls") opts.sources = { - require("none-ls.formatting.ruff").with({ extra_args = { "--extend-select", "F" } }), - require("none-ls.formatting.ruff_format"), } return opts end,