diff --git a/lazy-lock.json b/lazy-lock.json index a986ab0..601cc6c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,24 +1,24 @@ { - "AstroNvim": { "branch": "main", "commit": "55a2b084eabe880c4ffa377f82bb972caec57e09" }, + "AstroNvim": { "branch": "main", "commit": "ced71e326fd5a314eca237abe8a357eb4e9f40ae" }, "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" }, - "aerial.nvim": { "branch": "master", "commit": "6ab1a0ce4874d21610fc5a67a6c82c7b943c635b" }, + "aerial.nvim": { "branch": "master", "commit": "5c4e2da4486da5f9b798ea9a0f1fc5c6bcd3d9cf" }, "astrocore": { "branch": "main", "commit": "c797dd5a592e2bd154f2503e231b8a4083659534" }, "astrolsp": { "branch": "main", "commit": "0befe28a4ea96e46b7f7c01e4a634c04225ba55a" }, "astrotheme": { "branch": "main", "commit": "4a2af93815e4e6adfe69c836e46047a9451de858" }, "astroui": { "branch": "main", "commit": "4943abbd42674b43249313afe83b91065a40e4be" }, "auto-save.nvim": { "branch": "main", "commit": "37c82fd548e3f5ffc2d9d020a65dac1044584f44" }, - "bamboo.nvim": { "branch": "master", "commit": "6ec224a4fcf0970fce262fc5bb51048721d464f6" }, + "bamboo.nvim": { "branch": "master", "commit": "1309bc88bffcf1bedc3e84e7fa9004de93da774a" }, "better-escape.nvim": { "branch": "master", "commit": "199dcc2643dec5d8dbdab4ec672cf405224dcb3b" }, - "blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" }, - "copilot.vim": { "branch": "release", "commit": "da369d90cfd6c396b1d0ec259836a1c7222fb2ea" }, + "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, + "copilot.vim": { "branch": "release", "commit": "f89e977c87180519ba3b942200e3d05b17b1e2fc" }, "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" }, "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, "heirline.nvim": { "branch": "master", "commit": "fae936abb5e0345b85c3a03ecf38525b0828b992" }, - "lazy.nvim": { "branch": "main", "commit": "e6a8824858757ca9cd4f5ae1a72d845fa5c46a39" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, "lazydev.nvim": { "branch": "main", "commit": "01bc2aacd51cf9021eb19d048e70ce3dd09f7f93" }, - "lsp_signature.nvim": { "branch": "master", "commit": "62cadce83aaceed677ffe7a2d6a57141af7131ea" }, + "lsp_signature.nvim": { "branch": "master", "commit": "7d3bb0a641f516f1c7fd2e47852580dadbd7a430" }, "markview.nvim": { "branch": "main", "commit": "b41c643a8b99ea556e4dcefb60dbc043f75eb20d" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, "mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" }, @@ -27,20 +27,20 @@ "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" }, "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" }, "mini.move": { "branch": "main", "commit": "4d214202d71e0a4066b6288176bbe88f268f9777" }, - "neo-tree.nvim": { "branch": "main", "commit": "8cdd6b1940f333c1dd085526a9c45b30fb2dbf50" }, + "neo-tree.nvim": { "branch": "main", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, "neoconf.nvim": { "branch": "main", "commit": "7a8d7fd36f95f5cbbf57d4a5c463f6c54ad54cd3" }, - "none-ls-extras.nvim": { "branch": "main", "commit": "402c6b5c29f0ab57fac924b863709f37f55dc298" }, + "none-ls-extras.nvim": { "branch": "main", "commit": "03955d165621300965a6d685c8f399ec7efd5785" }, "none-ls.nvim": { "branch": "main", "commit": "6617d47fbf275d197e3335022a3d33ff310a4b93" }, "nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" }, "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, "nvim-dap": { "branch": "master", "commit": "a479e25ed5b5d331fb46ee4b9e160ff02ac64310" }, "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, "nvim-highlight-colors": { "branch": "main", "commit": "e0c4a58ec8c3ca7c92d3ee4eb3bc1dd0f7be317e" }, - "nvim-lsp-endhints": { "branch": "main", "commit": "d4ea1bf2dcbe1c4d522e2c06953988993a9acdf1" }, + "nvim-lsp-endhints": { "branch": "main", "commit": "20a05a41c55fd729ad0123bb3542e5a2071421dd" }, "nvim-lspconfig": { "branch": "master", "commit": "fa2662510d30b06168b6e2e6915518decde6bbac" }, - "nvim-spider": { "branch": "main", "commit": "a7705d7233ac3c47f7a1e80172bbeaa11f1c722f" }, + "nvim-spider": { "branch": "main", "commit": "3a803bc75d3b79826cf4c892d1d5655cbbc4d50b" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-treesitter-context": { "branch": "master", "commit": "ec308c7827b5f8cb2dd0ad303a059c945dd21969" }, + "nvim-treesitter-context": { "branch": "master", "commit": "64dd4cf3f6fd0ab17622c5ce15c91fc539c3f24a" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" }, "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, "nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" }, @@ -49,10 +49,10 @@ "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "resession.nvim": { "branch": "master", "commit": "cc819b0489938d03e4f3532a583354f0287c015b" }, "smart-splits.nvim": { "branch": "master", "commit": "ddb23c1a1cf1507bda487cda7f6e4690965ef9f5" }, - "snacks.nvim": { "branch": "main", "commit": "eadb0ca316ee9af078a181ff9517ce54cb048769" }, + "snacks.nvim": { "branch": "main", "commit": "a4e46becca45eb65c73a388634b1ce8aad629ae0" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, - "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "6a51446c2c8f09a7c207d2dc2aaa5bbbda36e093" }, + "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "72e160cb1ce8c0db2ac4315f77d97420a2f4223d" }, "vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" }, "vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" }, "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" } diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 284e4d5..6f4fe4a 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -35,36 +35,31 @@ vim.api.nvim_create_autocmd("BufWinEnter", { command = "let @/ = ''", }) --- vim.lsp.config("pyrefly", { --- -- example of how to run `uv` installed Pyrefly without adding to your path --- cmd = { "uvx", "pyrefly", "-c", "~/.config/nvim/pyrefly_config.yaml", "lsp" }, --- capabilities = { --- textDocument = { --- completion = { --- completionItem = { --- snippetSupport = false, --- preselectSupport = false, --- }, --- }, --- }, --- }, --- }) +vim.api.nvim_create_autocmd("FileType", { + pattern = "markdown", + callback = function() vim.opt_local.spell = false end, +}) vim.lsp.enable "pyrefly" vim.lsp.config("pyrefly", { - cmd = { - "uvx", - "pyrefly", - "lsp", - }, - capabilities = { - textDocument = { - completion = { - completionItem = { - snippetSupport = false, - preselectSupport = false, - }, - }, - }, + -- example of how to run `uv` installed Pyrefly without adding to your path + cmd = { "uvx", "pyrefly", "lsp" }, + filetypes = { 'python' }, + root_markers = { + 'pyrefly.toml', + 'pyproject.toml', + 'setup.py', + 'setup.cfg', + 'requirements.txt', + 'Pipfile', + '.git', + '.venv', + '.env', }, + on_init = function(client) + client.server_capabilities.definitionProvider = false + client.server_capabilities.renameProvider = false + client.server_capabilities.diagnosticProvider = false + -- client.server_capabilities.inlayHintProvider = false + end, }) diff --git a/lua/plugins/astrolsp.lua b/lua/plugins/astrolsp.lua index 4aec918..e1e908e 100644 --- a/lua/plugins/astrolsp.lua +++ b/lua/plugins/astrolsp.lua @@ -27,9 +27,6 @@ return { -- jedi_language_server = require "plugins.configs.lsp.config.jedi_language", -- ruff = require "plugins.configs.lsp.config.ruff", -- pylsp = require "plugins.configs.lsp.config.pylsp", - pyrefly = { - - } }, -- customize how language servers are attached handlers = { @@ -114,13 +111,21 @@ return { -- if client.name == "jedi_language_server" then client.server_capabilities.renameProvider = false end + if client.name == "pyrefly" then + -- client.server_capabilities.hoverProvider = false + -- client.server_capabilities.signatureHelpProvider = nil + client.server_capabilities.definitionProvider = false + -- client.server_capabilities.referencesProvider = false + -- client.server_capabilities.implementationProvider = false + end if client.name == "pyright" then + -- client.server_capabilities.renameProvider = false + -- client.server_capabilities.definitionProvider = false + client.server_capabilities.inlayHintProvider = false client.server_capabilities.hoverProvider = false - client.server_capabilities.renameProvider = false client.server_capabilities.signatureHelpProvider = nil client.server_capabilities.completionProvider = nil - client.server_capabilities.definitionProvider = false client.server_capabilities.codeLensProvider = nil client.server_capabilities.colorProvider = false client.server_capabilities.callHierarchyProvider = false @@ -148,41 +153,6 @@ return { fileOperations = { supported = false }, } end - - -- if client.name == "basedpyright" then - -- -- client.server_capabilities.definitionProvider = false # turn on inlay hints - -- client.server_capabilities.renameProvider = false - -- client.server_capabilities.completionProvider = nil - -- client.server_capabilities.hoverProvider = false - -- client.server_capabilities.signatureHelpProvider = nil - -- - -- client.server_capabilities.codeLensProvider = nil - -- client.server_capabilities.colorProvider = false - -- client.server_capabilities.callHierarchyProvider = false - -- client.server_capabilities.documentFormattingProvider = false - -- client.server_capabilities.documentRangeFormattingProvider = false - -- client.server_capabilities.declarationProvider = false - -- client.server_capabilities.documentLinkProvider = nil - -- client.server_capabilities.documentOnTypeFormattingProvider = nil - -- client.server_capabilities.documentSymbolProvider = false - -- client.server_capabilities.inlineCompletionProvider = false - -- client.server_capabilities.inlineValueProvider = false - -- client.server_capabilities.notebookDocumentSync = nil - -- client.server_capabilities.typeDefinitionProvider = false - -- client.server_capabilities.workspaceSymbolProvider = false - -- client.server_capabilities.monikerProvider = false - -- client.server_capabilities.semanticTokensProvider = nil - -- client.server_capabilities.referencesProvider = false - -- client.server_capabilities.implementationProvider = false - -- client.server_capabilities.foldingRangeProvider = false - -- client.server_capabilities.selectionRangeProvider = false - -- client.server_capabilities.linkedEditingRangeProvider = false - -- client.server_capabilities.executeCommandProvider = nil - -- client.server_capabilities.workspace = { - -- workspaceFolders = { supported = false }, - -- fileOperations = { supported = false }, - -- } - -- end end, }, } diff --git a/lua/plugins/configs/lsp/config/pyrefly.lua b/lua/plugins/configs/lsp/config/pyrefly.lua new file mode 100644 index 0000000..cbfe0f5 --- /dev/null +++ b/lua/plugins/configs/lsp/config/pyrefly.lua @@ -0,0 +1,42 @@ + +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 "python3" + end, + settings = { + python = { + disableLanguageServices = true, + disableOrganizeImports = true, + disableTaggedHints = true, + openFilesOnly = true, + useLibraryCodeForTypes = false, + + analysis = { + useLibraryCodeForTypes = false, + autoImportCompletions = false, + diagnosticMode = "openFilesOnly", + typeCheckingMode = "off", + autoSearchPath = false, + logLevel = "Error", + verboseOutput = false, + pythonPlatform = "Linux", + exclude = { + "**/unsloth_compiled_cache/**", + "**/__pycache__/**", + "**/.venv/**", + "__index__", + "**/.*", + }, + ignore = { + "**/unsloth_compiled_cache/**", + "**/__pycache__/**", + "__index__", + "**/.venv/**", + "**/*.ipynb", + }, + }, + }, + }, +} diff --git a/lua/plugins/developments.lua b/lua/plugins/developments.lua index 7c23ff2..aeb1a51 100644 --- a/lua/plugins/developments.lua +++ b/lua/plugins/developments.lua @@ -9,7 +9,7 @@ return { type = "󰜁 ", parameter = "󰏪 ", offspec = "󰀒 ", -- hint kind not defined in official LSP spec - unknown = " ", -- hint kind is nil + unknown = "", -- hint kind is nil }, label = { truncateAtChars = 100, diff --git a/lua/plugins/disabled.lua b/lua/plugins/disabled.lua index de2e2f8..e67b066 100644 --- a/lua/plugins/disabled.lua +++ b/lua/plugins/disabled.lua @@ -13,6 +13,7 @@ return { -- { "ray-x/lsp_signature.nvim", enabled = false }, { "brenoprata10/nvim-highlight-colors", enabled = false }, + { "OXY2DEV/markview.nvim", enabled = false }, -- Disabled development plugins { "mfussenegger/nvim-dap", enabled = false }, diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua index d397d97..2c330e9 100644 --- a/lua/plugins/ui.lua +++ b/lua/plugins/ui.lua @@ -38,29 +38,5 @@ return { }, }, }, - { - "OXY2DEV/markview.nvim", - lazy = false, - ft = function() - local plugin = require("lazy.core.config").spec.plugins["markview.nvim"] - local opts = require("lazy.core.plugin").values(plugin, "opts", false) - return opts.filetypes or { "markdown", "quarto", "rmd" } - end, - dependencies = { - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if opts.ensure_installed ~= "all" then - opts.ensure_installed = - require("astrocore").list_insert_unique(opts.ensure_installed, { "html", "markdown", "markdown_inline" }) - end - end, - "saghen/blink.cmp" - }, - opts = { - preview = { - hybrid_modes = { "n" }, - headings = { shift_width = 0 }, - }, - }, - }, + }