diff --git a/init.lua b/init.lua index 67b9686..3a5cdf7 100644 --- a/init.lua +++ b/init.lua @@ -18,5 +18,9 @@ if not pcall(require, "lazy") then vim.cmd.quit() end +-- NOTE: ENV +-- Disable Copilot tab mapping +vim.g.copilot_no_tab_map = true + require("lazy_setup") require("polish") diff --git a/lazy-lock.json b/lazy-lock.json index b0451e2..d30543a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,7 +4,7 @@ "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, "aerial.nvim": { "branch": "master", "commit": "3284a2cb858ba009c79da87d5e010ccee3c99c4d" }, "alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" }, - "astrocommunity": { "branch": "main", "commit": "c44cdc008f6b2fb745a7c829100b87a1cfb21b82" }, + "astrocommunity": { "branch": "main", "commit": "b3ed1de31b0109b28668385336f84dc60c792de3" }, "astrocore": { "branch": "main", "commit": "44a3dc0bf1591022b2a6bc89dccdfac1be17bec9" }, "astrolsp": { "branch": "main", "commit": "909fbe64f3f87d089ff3777751261544557117cc" }, "astrotheme": { "branch": "main", "commit": "41b7d8430a55fd771e41bd763af4c3fd1c2fc0b5" }, @@ -42,9 +42,9 @@ "mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, "mini.bufremove": { "branch": "main", "commit": "285bdac9596ee7375db50c0f76ed04336dcd2685" }, - "mini.icons": { "branch": "main", "commit": "94848dad1589a199f876539bd79befb0c5e3abf0" }, - "mini.indentscope": { "branch": "main", "commit": "5fdc3edf7bb1b6365980c2c47dac2f19ec93c97b" }, - "mini.move": { "branch": "main", "commit": "f471ecb98395781827ef1dffee61afe1af0ace29" }, + "mini.icons": { "branch": "main", "commit": "b8f6fa6f5a3fd0c56936252edcd691184e5aac0c" }, + "mini.indentscope": { "branch": "main", "commit": "f1567c6f46c250b22f4ad1b847a042464742b11d" }, + "mini.move": { "branch": "main", "commit": "819e90c3e113a3c826c3003ec07073f1e0677ea0" }, "monokai-pro.nvim": { "branch": "master", "commit": "4f4133601296881bb2197800bd68d2bba9eaadb9" }, "multiple-cursors.nvim": { "branch": "main", "commit": "1ac15d047a4b265cc2389957bcc56ee561b29e02" }, "neo-tree.nvim": { "branch": "main", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" }, @@ -63,16 +63,16 @@ "nvim-lspconfig": { "branch": "master", "commit": "185b2af444b27d6541c02d662b5b68190e5cf0c4" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-notify": { "branch": "master", "commit": "a3020c2cf4dfc4c4f390c4a21e84e35e46cf5d17" }, - "nvim-spider": { "branch": "main", "commit": "d4bdc45eac425e77108f068bd0706ff3ac20be7f" }, + "nvim-spider": { "branch": "main", "commit": "6da0307421bc4be6fe02815faabde51007c4ea1a" }, "nvim-treesitter": { "branch": "master", "commit": "f8aaf5ce4e27cd20de917946b2ae5c968a2c2858" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" }, "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, "nvim-ufo": { "branch": "main", "commit": "a5390706f510d39951dd581f6d2a972741b3fa26" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "55ad4fb76ab68460f700599b7449385f0c4e858e" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "97bf4b8ef9298644a29fcd9dd41a0210cf08cac7" }, "resession.nvim": { "branch": "master", "commit": "cc819b0489938d03e4f3532a583354f0287c015b" }, - "schemastore.nvim": { "branch": "main", "commit": "36fb914c0defa2274207e670182253508e5569d5" }, + "schemastore.nvim": { "branch": "main", "commit": "67d6c391e9a372d2d8701b5b8c9ae89455561fbf" }, "smart-splits.nvim": { "branch": "master", "commit": "ddb23c1a1cf1507bda487cda7f6e4690965ef9f5" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope.nvim": { "branch": "master", "commit": "a17d611a0e111836a1db5295f04945df407c5135" }, diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index b4f579c..cde9700 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -18,7 +18,6 @@ return function() mappings.n[""] = false mappings.n[""] = false mappings.n[""] = false - mappings.n["K"] = false ------------------------------------------- ----------- Utility functions ------------- diff --git a/lua/plugins/astrolsp.lua b/lua/plugins/astrolsp.lua index 2c21440..895f439 100644 --- a/lua/plugins/astrolsp.lua +++ b/lua/plugins/astrolsp.lua @@ -27,7 +27,7 @@ return { jedi_language_server = { init_options = { completion = { - disableSnippets = false, + disableSnippets = true, }, diagnostics = { enable = true, @@ -40,6 +40,9 @@ return { "sklearn", }, }, + workspace = { + environmentPath = "/home/duckq1u/miniconda3/envs/OCR3/bin/python" + } }, }, diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index f4b9fba..be9589f 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -97,8 +97,6 @@ return { -- Tab to select completion [""] = cmp.mapping(function(fallback) if cmp.visible() and has_words_before() then - - vim.g.copilot_no_tab_map = true -- NOTE: disable copilot's tab mapping PART1 fallback() else fallback() @@ -123,7 +121,6 @@ return { -- NOTE: disable tabl when using copilot PART2 vim.api.nvim_set_keymap("i", "", 'copilot#Accept("\\")', { expr = true, silent = true }), - vim.keymap.del("i", ""), -- [""] = cmp.mapping(function(fallback) -- -- Check if Copilot is suggesting something -- if vim.fn["copilot#Accept"]() ~= "" then diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 9694d6e..0b05209 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -19,13 +19,11 @@ return { -- 'thumbs.db', }, never_show = {}, - never_show_by_pattern = { -- uses glob style patterns - '*.zip', - '*.rar', - '*.pdf', + "*.zip", + "*.rar", + "*.pdf", }, - }, }, enable_git_status = false, diff --git a/lua/plugins/noice.lua b/lua/plugins/noice.lua index 98d77ba..941f48a 100644 --- a/lua/plugins/noice.lua +++ b/lua/plugins/noice.lua @@ -1,120 +1,124 @@ return { - "folke/noice.nvim", - event = "VeryLazy", - dependencies = { "MunifTanjim/nui.nvim" }, - config = function() - require("noice").setup { - -- Configuration here, or leave empty to use defaults - views = {}, - messages = { - enabled = false, -- disables the Noice messages UI - }, - notify = { - enabled = false, -- disables Noice notifications - }, - lsp = { - progress = { - enabled = false, - }, - hover = { - enabled = true, - silent = true, - view = "hover", - opts = { - border = { - style = "rounded", - text = { top = " Documents ", top_align = "center" }, - }, - win_options = { - wrap = true, - linebreak = true, - }, - }, - }, - signature = { - enabled = false, -- disables Noice LSP signature help - }, - message = { - enabled = false, - }, - }, - presets = { - bottom_search = false, -- use a classic bottom cmdline for search - command_palette = true, -- position the cmdline and popupmenu together - long_message_to_split = false, -- long messages will be sent to a split - inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = false, -- add a border to hover docs and signature help - }, + "folke/noice.nvim", + event = "VeryLazy", + dependencies = { "MunifTanjim/nui.nvim" }, + config = function() + require("noice").setup({ + -- Configuration here, or leave empty to use defaults + views = {}, + messages = { + enabled = false, -- disables the Noice messages UI + }, + notify = { + enabled = false, -- disables Noice notifications + }, + lsp = { + progress = { + enabled = false, + }, + hover = { + enabled = true, + silent = true, + view = "hover", + opts = { + border = { + style = "rounded", + text = { top = " Documents ", top_align = "center" }, + }, + win_options = { + wrap = true, + linebreak = true, + }, + }, + }, + signature = { + enabled = false, -- disables Noice LSP signature help + }, + message = { + enabled = false, + }, + }, + presets = { + bottom_search = false, -- use a classic bottom cmdline for search + command_palette = true, -- position the cmdline and popupmenu together + long_message_to_split = false, -- long messages will be sent to a split + inc_rename = false, -- enables an input dialog for inc-rename.nvim + lsp_doc_border = false, -- add a border to hover docs and signature help + }, - routes = { - -- disable "written" notification - { - filter = { event = "msg_show", kind = "", find = "written" }, - opts = { skip = true }, - }, - -- disable paste/undo notification - { - filter = { event = "msg_show", find = "^%d+ more lines" }, - opts = { skip = true }, - }, - -- disable delete/undo notification - { - filter = { event = "msg_show", find = "^%d+ fewer lines" }, - opts = { skip = true }, - }, - -- disable yank notification - { - filter = { event = "msg_show", find = "^%d+ lines yanked$" }, - opts = { skip = true }, - }, - -- disable move notification - { - filter = { event = "msg_show", find = "^%d+ lines moved$" }, - }, - }, - } - end, - specs = { - { - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if opts.ensure_installed ~= "all" then - opts.ensure_installed = require("astrocore").list_insert_unique( - opts.ensure_installed, - { "bash", "markdown", "markdown_inline", "regex", "vim" } - ) - end - end, - }, - { - "AstroNvim/astrolsp", - optional = true, - ---@param opts AstroLSPOpts - opts = function(_, opts) - -- No need to manage lsp_handlers as noice is not handling them now - end, - }, - { - "heirline.nvim", - optional = true, - opts = function(_, opts) - local noice_opts = require("astrocore").plugin_opts "noice.nvim" - if vim.tbl_get(noice_opts, "lsp", "progress", "enabled") ~= false then -- check if lsp progress is enabled - opts.statusline[9] = require("astroui.status").component.lsp { lsp_progress = false } - end - end, - }, - { - "folke/edgy.nvim", - optional = true, - opts = function(_, opts) - if not opts.bottom then opts.bottom = {} end - table.insert(opts.bottom, { - ft = "noice", - size = { height = 0.4 }, - filter = function(_, win) return vim.api.nvim_win_get_config(win).relative == "" end, - }) - end, - }, - }, + routes = { + -- disable "written" notification + { + filter = { event = "msg_show", kind = "", find = "written" }, + opts = { skip = true }, + }, + -- disable paste/undo notification + { + filter = { event = "msg_show", find = "^%d+ more lines" }, + opts = { skip = true }, + }, + -- disable delete/undo notification + { + filter = { event = "msg_show", find = "^%d+ fewer lines" }, + opts = { skip = true }, + }, + -- disable yank notification + { + filter = { event = "msg_show", find = "^%d+ lines yanked$" }, + opts = { skip = true }, + }, + -- disable move notification + { + filter = { event = "msg_show", find = "^%d+ lines moved$" }, + }, + }, + }) + end, + specs = { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if opts.ensure_installed ~= "all" then + opts.ensure_installed = require("astrocore").list_insert_unique( + opts.ensure_installed, + { "bash", "markdown", "markdown_inline", "regex", "vim" } + ) + end + end, + }, + { + "AstroNvim/astrolsp", + optional = true, + ---@param opts AstroLSPOpts + opts = function(_, opts) + -- No need to manage lsp_handlers as noice is not handling them now + end, + }, + { + "heirline.nvim", + optional = true, + opts = function(_, opts) + local noice_opts = require("astrocore").plugin_opts("noice.nvim") + if vim.tbl_get(noice_opts, "lsp", "progress", "enabled") ~= false then -- check if lsp progress is enabled + opts.statusline[9] = require("astroui.status").component.lsp({ lsp_progress = false }) + end + end, + }, + { + "folke/edgy.nvim", + optional = true, + opts = function(_, opts) + if not opts.bottom then + opts.bottom = {} + end + table.insert(opts.bottom, { + ft = "noice", + size = { height = 0.4 }, + filter = function(_, win) + return vim.api.nvim_win_get_config(win).relative == "" + end, + }) + end, + }, + }, } diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua index 0273982..f341f44 100644 --- a/lua/plugins/none-ls.lua +++ b/lua/plugins/none-ls.lua @@ -9,14 +9,14 @@ return { }, opts = function(_, opts) -- config variable is the default configuration table for the setup function call - local null_ls = require "null-ls" + local null_ls = require("null-ls") -- Check supported formatters and linters -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics opts.sources = { - require('none-ls.formatting.ruff').with { extra_args = { '--extend-select', 'F' } }, - require 'none-ls.formatting.ruff_format', -- Set a formatter + require("none-ls.formatting.ruff").with({ extra_args = { "--extend-select", "F" } }), + require("none-ls.formatting.ruff_format"), -- Set a formatter } return opts end, diff --git a/lua/plugins/nvim-dap-ui.lua b/lua/plugins/nvim-dap-ui.lua index 17e8446..6b5ff18 100644 --- a/lua/plugins/nvim-dap-ui.lua +++ b/lua/plugins/nvim-dap-ui.lua @@ -50,8 +50,8 @@ return { }, }, config = function(_, opts) - local dap = require "dap" - local dapui = require "dapui" + local dap = require("dap") + local dapui = require("dapui") -- Initialize dap-ui dapui.setup(opts) @@ -65,7 +65,9 @@ return { end -- Optionally, open dap-ui when session starts - dap.listeners.after.event_initialized["dapui"] = function() dapui.open() end + dap.listeners.after.event_initialized["dapui"] = function() + dapui.open() + end end, }, {