From 5b10a1093cc6e4a9c2e80f05288bad1c2e9cb1f3 Mon Sep 17 00:00:00 2001 From: megawonzz9 Date: Mon, 8 Sep 2025 11:05:58 +0200 Subject: [PATCH] sigma sgima --- init.lua | 22 +++++++++++++++------- lua/custom/plugins/blink-compat.lua | 8 ++++++++ lua/custom/plugins/cord.lua | 6 ------ lua/custom/plugins/hardtime.lua | 6 ++++++ lua/custom/plugins/mason-nvim-dap.lua | 14 ++++++++++++++ lua/custom/plugins/oil.lua | 10 ++++++++++ lua/custom/plugins/snipe.lua | 6 +++++- lua/custom/plugins/tscontext.lua | 7 +++---- lua/custom/plugins/vimbegood.lua | 1 + lua/kickstart/plugins/autopairs.lua | 18 +++++++++++++++++- lua/kickstart/plugins/neo-tree.lua | 25 ------------------------- 11 files changed, 79 insertions(+), 44 deletions(-) create mode 100644 lua/custom/plugins/blink-compat.lua delete mode 100644 lua/custom/plugins/cord.lua create mode 100644 lua/custom/plugins/hardtime.lua create mode 100644 lua/custom/plugins/mason-nvim-dap.lua create mode 100644 lua/custom/plugins/oil.lua delete mode 100644 lua/kickstart/plugins/neo-tree.lua diff --git a/init.lua b/init.lua index 52feff0a..1b43e19e 100644 --- a/init.lua +++ b/init.lua @@ -168,6 +168,11 @@ vim.opt.confirm = true -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` +-- OIL NVIM +vim.keymap.set('n', 'e', 'Oil', { desc = 'Open file explorer' }) + +vim.keymap.set('n', '-', 'Oil', { desc = 'Open file explorer' }) + -- Clear highlights on search when pressing in normal mode -- See `:help hlsearch` vim.keymap.set('n', '', 'nohlsearch') @@ -183,11 +188,14 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn -- or just use to exit terminal mode vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) +vim.keymap.set('n', '[c', function() + require('treesitter-context').go_to_context(vim.v.count1) +end, { silent = true, desc = 'Jump to top of current function' }) -- TIP: Disable arrow keys in normal mode --- vim.keymap.set('n', '', 'echo "Use h to move!!"') --- vim.keymap.set('n', '', 'echo "Use l to move!!"') --- vim.keymap.set('n', '', 'echo "Use k to move!!"') --- vim.keymap.set('n', '', 'echo "Use j to move!!"') +vim.keymap.set('n', '', 'echo "Use h to move!!"') +vim.keymap.set('n', '', 'echo "Use l to move!!"') +vim.keymap.set('n', '', 'echo "Use k to move!!"') +vim.keymap.set('n', '', 'echo "Use j to move!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows @@ -723,7 +731,7 @@ require('lazy').setup({ require('mason-lspconfig').setup { ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer) - automatic_installation = false, + automatic_installation = true, handlers = { function(server_name) local server = servers[server_name] or {} @@ -857,7 +865,7 @@ require('lazy').setup({ completion = { -- By default, you may press `` to show the documentation. -- Optionally, set `auto_show = true` to show the documentation after a delay. - documentation = { auto_show = false, auto_show_delay_ms = 500 }, + documentation = { auto_show = true, auto_show_delay_ms = 500 }, }, sources = { @@ -988,7 +996,6 @@ require('lazy').setup({ require 'kickstart.plugins.indent_line', require 'kickstart.plugins.lint', require 'kickstart.plugins.autopairs', - require 'kickstart.plugins.neo-tree', require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` @@ -1024,5 +1031,6 @@ require('lazy').setup({ }, }) +vim.api.nvim_set_hl(0, 'BlinkCmpKindCopilot', { fg = '#6CC644' }) -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/plugins/blink-compat.lua b/lua/custom/plugins/blink-compat.lua new file mode 100644 index 00000000..2115f9c8 --- /dev/null +++ b/lua/custom/plugins/blink-compat.lua @@ -0,0 +1,8 @@ +return { + { + 'saghen/blink.compat', + version = '*', + lazy = true, + opts = {}, + }, +} diff --git a/lua/custom/plugins/cord.lua b/lua/custom/plugins/cord.lua deleted file mode 100644 index 361c2938..00000000 --- a/lua/custom/plugins/cord.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - - 'vyfor/cord.nvim', - build = ':Cord update', - -- opts = {} -} diff --git a/lua/custom/plugins/hardtime.lua b/lua/custom/plugins/hardtime.lua new file mode 100644 index 00000000..1119b6dc --- /dev/null +++ b/lua/custom/plugins/hardtime.lua @@ -0,0 +1,6 @@ +return { + 'm4xshen/hardtime.nvim', + lazy = false, + dependencies = { 'MunifTanjim/nui.nvim' }, + opts = {}, +} diff --git a/lua/custom/plugins/mason-nvim-dap.lua b/lua/custom/plugins/mason-nvim-dap.lua new file mode 100644 index 00000000..b575e2b7 --- /dev/null +++ b/lua/custom/plugins/mason-nvim-dap.lua @@ -0,0 +1,14 @@ +return { + 'jay-babu/mason-nvim-dap.nvim', + dependencies = { + 'williamboman/mason.nvim', + 'mfussenegger/nvim-dap', + }, + config = function() + require('mason-nvim-dap').setup { + ensure_installed = { 'codelldb' }, + automatic_installation = true, + handlers = {}, + } + end, +} diff --git a/lua/custom/plugins/oil.lua b/lua/custom/plugins/oil.lua new file mode 100644 index 00000000..a23c0029 --- /dev/null +++ b/lua/custom/plugins/oil.lua @@ -0,0 +1,10 @@ +return { + 'stevearc/oil.nvim', + ---@module 'oil' + ---@type oil.SetupOpts + opts = {}, + -- Optional dependencies + dependencies = { 'nvim-tree/nvim-web-devicons' }, -- use if you prefer nvim-web-devicons + -- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations. + lazy = false, +} diff --git a/lua/custom/plugins/snipe.lua b/lua/custom/plugins/snipe.lua index fa7c1ba8..ae35a8e9 100644 --- a/lua/custom/plugins/snipe.lua +++ b/lua/custom/plugins/snipe.lua @@ -9,5 +9,9 @@ return { desc = 'Open Snipe buffer menu', }, }, - opts = {}, + opts = { + ui = { + position = 'center', + }, + }, } diff --git a/lua/custom/plugins/tscontext.lua b/lua/custom/plugins/tscontext.lua index 814ca8ea..b4b6ecbc 100644 --- a/lua/custom/plugins/tscontext.lua +++ b/lua/custom/plugins/tscontext.lua @@ -1,6 +1,5 @@ return { - { - 'nvim-treesitter/nvim-treesitter-context', - lazy = false, - }, + 'nvim-treesitter/nvim-treesitter-context', + opts = { mode = 'cursor', max_lines = 3 }, + dependencies = { 'nvim-treesitter/nvim-treesitter' }, } diff --git a/lua/custom/plugins/vimbegood.lua b/lua/custom/plugins/vimbegood.lua index b1e2a543..e1ffd383 100644 --- a/lua/custom/plugins/vimbegood.lua +++ b/lua/custom/plugins/vimbegood.lua @@ -1,3 +1,4 @@ return { 'ThePrimeagen/vim-be-good', + event = 'VeryLazy', } diff --git a/lua/kickstart/plugins/autopairs.lua b/lua/kickstart/plugins/autopairs.lua index 386d392e..fadbfce3 100644 --- a/lua/kickstart/plugins/autopairs.lua +++ b/lua/kickstart/plugins/autopairs.lua @@ -4,5 +4,21 @@ return { 'windwp/nvim-autopairs', event = 'InsertEnter', - opts = {}, + opts = { + check_ts = true, -- use Treesitter for smart pairing + }, + config = function(_, opts) + local npairs = require 'nvim-autopairs' + npairs.setup(opts) + + -- Add custom rule for < > in Rust + local Rule = require 'nvim-autopairs.rule' + + npairs.add_rules { + Rule('<', '>', 'rust'):with_pair(function(opts) + local next_char = opts.line:sub(opts.col + 1, opts.col + 1) + return next_char ~= '=' -- avoid pairing in things like <= + end), + } + end, } diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua deleted file mode 100644 index bd442269..00000000 --- a/lua/kickstart/plugins/neo-tree.lua +++ /dev/null @@ -1,25 +0,0 @@ --- Neo-tree is a Neovim plugin to browse the file system --- https://github.com/nvim-neo-tree/neo-tree.nvim - -return { - 'nvim-neo-tree/neo-tree.nvim', - version = '*', - dependencies = { - 'nvim-lua/plenary.nvim', - 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended - 'MunifTanjim/nui.nvim', - }, - cmd = 'Neotree', - keys = { - { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, - }, - opts = { - filesystem = { - window = { - mappings = { - ['\\'] = 'close_window', - }, - }, - }, - }, -}