diff --git a/lazy-lock.json b/lazy-lock.json index de9f93e..2b3e263 100755 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,48 +1,51 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "CopilotChat.nvim": { "branch": "canary", "commit": "5a935ffbdf3d790ae7b51fee358ce7252365b5e9" }, - "LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, - "NvChad": { "branch": "v2.5", "commit": "bbc3d43db088c141b142a40cd5f717635833a54e" }, - "base46": { "branch": "v2.5", "commit": "40943fc668bf8f1caa4cc45f71c784cf0d3cc34f" }, - "black": { "branch": "main", "commit": "fdabd424e237f89d8b3f53cf8157902bbf850e45" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "CopilotChat.nvim": { "branch": "main", "commit": "a89f5f1162b04a0962e5f4c3cdf248a81e7e53cb" }, + "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, + "NvChad": { "branch": "v2.5", "commit": "46b15ef1b9d10a83ab7df26b14f474d15c01e770" }, + "base46": { "branch": "v2.5", "commit": "fde7a2cd54599e148d376f82980407c2d24b0fa2" }, + "black": { "branch": "main", "commit": "d0ff3bd6cb82e35b1529155d29fca2c13442e68d" }, + "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "62d5accad8b29d6ba9b58d3dff90c43a55621c60" }, - "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" }, - "copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" }, - "crates.nvim": { "branch": "main", "commit": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785" }, - "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, - "gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" }, - "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, - "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, - "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "c6c686781f9841d855bf1b926e10aa5e19430a38" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, - "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "menu": { "branch": "main", "commit": "657bfc91382c0928453d9a4d0a10ec92db5de2bb" }, - "minty": { "branch": "main", "commit": "b454ca0229f8e22a631fd3c014ec99973fb8cad4" }, + "conform.nvim": { "branch": "master", "commit": "eebc724d12c5579d733d1f801386e0ceb909d001" }, + "copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" }, + "copilot.lua": { "branch": "master", "commit": "c62a2a7616a9789a7676b6b7a8d9263b1082cdc8" }, + "crates.nvim": { "branch": "main", "commit": "73d2c590c74a0c582144987a4decb4a642755859" }, + "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, + "gitsigns.nvim": { "branch": "main", "commit": "fcfa7a989cd6fed10abf02d9880dc76d7a38167d" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lualine.nvim": { "branch": "master", "commit": "86fe39534b7da729a1ac56c0466e76f2c663dc42" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" }, + "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, + "menu": { "branch": "main", "commit": "ce1d8b5fc980edc388cd0da0884cacea25dcc6c5" }, + "minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" }, + "neocord": { "branch": "main", "commit": "2ebf3792a8100376bb65fd66d5dbf60f50af7529" }, "neoscroll.nvim": { "branch": "master", "commit": "f957373912e88579e26fdaea4735450ff2ef5c9c" }, - "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" }, - "nvim-cmp": { "branch": "main", "commit": "be7bd4c5f860c79da97af3a26d489af50babfd4b" }, - "nvim-dap": { "branch": "master", "commit": "cc92b054720a96170eca6bd9bdedd43d2b0a7a8a" }, - "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, - "nvim-lspconfig": { "branch": "master", "commit": "c646154d6e4db9b2979eeb517d0b817ad00c9c47" }, - "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-tree.lua": { "branch": "master", "commit": "1f3ffd6af145af2a4930a61c50f763264922c3fe" }, - "nvim-treesitter": { "branch": "master", "commit": "28a5dc06a842459964203c41a7aac91a77feff20" }, - "nvim-web-devicons": { "branch": "master", "commit": "f09be61d05bebcba85bb47be1931322d51b95644" }, - "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, + "nvim-autopairs": { "branch": "master", "commit": "2a406cdd8c373ae7fe378a9e062a5424472bd8d8" }, + "nvim-cmp": { "branch": "main", "commit": "059e89495b3ec09395262f16b1ad441a38081d04" }, + "nvim-dap": { "branch": "master", "commit": "7aade9e99bef5f0735cf966e715b3ce45515d786" }, + "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, + "nvim-lspconfig": { "branch": "master", "commit": "81a570f58b2113cc2d538efae743ad38d6ab564f" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-tree.lua": { "branch": "master", "commit": "5bea2b37523a31288e0fcab42f3be5c1bd4516bb" }, + "nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" }, + "nvim-web-devicons": { "branch": "master", "commit": "c90dee4e930ab9f49fa6d77f289bff335b49e972" }, + "persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, - "rustaceanvim": { "branch": "master", "commit": "6e742b9fc6a37e46181879f6c32cecfa8cd2cebf" }, + "rustaceanvim": { "branch": "master", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" }, + "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, "suda.vim": { "branch": "master", "commit": "9adda7d195222d4e2854efb2a88005a120296c47" }, - "telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" }, + "telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" }, "transparent.nvim": { "branch": "main", "commit": "8a2749a2fa74f97fe6557f61b89ac7fd873f3c21" }, - "ui": { "branch": "v3.0", "commit": "8cc265d1fc663a4bcd39c68e60a76adef6df031e" }, + "ui": { "branch": "v3.0", "commit": "9201de37eb4992bef5fec974618a9a14082765fe" }, + "vim-fugitive": { "branch": "master", "commit": "593f831d6f6d779cbabb70a4d1e6b1b1936a88af" }, "vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" }, - "volt": { "branch": "main", "commit": "8d35e03c70490190149a77c59155618ef4370721" }, - "which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" } + "volt": { "branch": "main", "commit": "c45d5f48da8e802e608b5c6da471ca4d84276dfb" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } } diff --git a/lua/configs/lspconfig.lua b/lua/configs/lspconfig.lua index 942edbc..ffa81cf 100755 --- a/lua/configs/lspconfig.lua +++ b/lua/configs/lspconfig.lua @@ -1,6 +1,6 @@ require("mason").setup() require("mason-lspconfig").setup({ - ensure_installed = { "pyright", "html", "cssls" }, -- Ensure pyright is installed + ensure_installed = { "pyright", "html", "cssls", "quick_lint_js" }, -- Ensure pyright is installed }) -- Load lspconfig @@ -8,7 +8,7 @@ local lspconfig = require("lspconfig") local nvlsp = require "nvchad.configs.lspconfig" -- Set up servers -local servers = { "html", "cssls", "pyright" } +local servers = { "html", "cssls", "pyright", "quick_lint_js" } for _, lsp in ipairs(servers) do lspconfig[lsp].setup({ diff --git a/lua/mappings.lua b/lua/mappings.lua index 8ecb509..1528c1e 100755 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -8,14 +8,22 @@ local map = vim.keymap.set vim.opt.mouse = "" map("i", "jk", "") -vim.keymap.set('n', '', ':NvimTreeToggle', { noremap = true, silent = true }) --- Unmap from normal mode +-- vim.keymap.set('n', '', ':NvimTreeToggle', { noremap = true, silent = true }) vim.api.nvim_del_keymap('n', '') --- Reassign it to Visual Multi for subword under feature +-- Define the function globally +function open_snacks_explorer(opts) + require('snacks').explorer.open(opts or {}) +end + +-- Set the keybinding to call the function +vim.api.nvim_set_keymap('n', 'e', ':lua open_snacks_explorer()', { noremap = true, silent = true }) + + vim.g.VM_maps = vim.g.VM_maps or {} vim.g.VM_maps[''] = '(VM-Find-Subword-Under)' vim.g.mapleader = " " +vim.keymap.set("n", "", ':CopilotChatOpen', { noremap = true, silent = true }) vim.keymap.set("i", "", function() require("copilot.suggestion").accept() end, { noremap = true, silent = true }) @@ -23,9 +31,28 @@ end, { noremap = true, silent = true }) vim.api.nvim_set_keymap('', '', '', { noremap = true, silent = true }) vim.api.nvim_set_keymap('', '', '', { noremap = true, silent = true }) -vim.keymap.set('n', '', ':tabnext', { noremap = true, silent = true }) -- Next tab -vim.keymap.set('n', '', ':tabprev', { noremap = true, silent = true }) -- Previous tab -vim.keymap.set('n', 'tn', ':tabnew', { noremap = true, silent = true }) -- New tab -vim.keymap.set('n', 'tc', ':tabclose', { noremap = true, silent = true }) -- Close tab +vim.keymap.set("n", "t", function() + local word = vim.fn.expand("") + if word == "true" then + vim.cmd("normal! ciwfalse") + elseif word == "false" then + vim.cmd("normal! ciwtrue") + end +end, { noremap = true, silent = true }) + +-- vim.keymap.set('n', '', ':tabnext', { noremap = true, silent = true }) +-- vim.keymap.set('n', '', ':tabprev', { noremap = true, silent = true }) +-- vim.keymap.set('n', 'tn', ':tabnew', { noremap = true, silent = true }) +-- vim.keymap.set('n', 'tc', ':tabclose', { noremap = true, silent = true }) + +vim.keymap.set("n", "", "resize +2", { desc = "Increase Window Height" }) +vim.keymap.set("n", "", "resize -2", { desc = "Decrease Window Height" }) +vim.keymap.set("n", "", "vertical resize +2", { desc = "Increase Window Width" }) +vim.keymap.set("n", "", "vertical resize -2", { desc = "Decrease Window Width" }) + +-- Make d, dd, x, etc. not copy to register +vim.keymap.set("n", "d", '"_d', { noremap = true }) +vim.keymap.set("n", "dd", '"_dd', { noremap = true }) +vim.keymap.set("v", "d", '"_d', { noremap = true }) -- map({ "n", "i", "v" }, "", " w ") diff --git a/lua/options.lua b/lua/options.lua index 5bae94b..f833333 100755 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,6 +1,22 @@ require "nvchad.options" --- add yours here! +local Snacks = require ("snacks") + +Snacks.setup({ + bigfile = { enabled = true }, + dashboard = { enabled = true }, + explorer = { enabled = true}, + -- indent = { enabled = true }, + input = { enabled = true }, + picker = { enabled = true }, + notifier = { enabled = true }, + quickfile = { enabled = true }, + scope = { enabled = true }, + -- scroll = { enabled = true }, + statuscolumn = { enabled = true }, + words = { enabled = true }, + keys = { + { "e", function() Snacks.explorer() end, desc = "File Explorer" }, + } + }) --- local o = vim.o --- o.cursorlineopt ='both' -- to enable cursorline! diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 557ede1..e955e8f 100755 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -8,21 +8,32 @@ return { opts = require "configs.conform", }, { - "andweeb/presence.nvim", + "IogaMaster/neocord", opts = { show_time = true, buttons = true, enable_line_number = true, - }, + global_timer = true, + }, }, -- Basic plugins { "nvim-lualine/lualine.nvim", lazy = false }, - { "nvim-tree/nvim-tree.lua", lazy = false }, + { "nvim-tree/nvim-tree.lua", enabled = false }, { "karb94/neoscroll.nvim", lazy = false }, { "lambdalisue/suda.vim", lazy = false }, { "numToStr/Comment.nvim", lazy = false}, { "mg979/vim-visual-multi", lazy = false}, + { "tpope/vim-fugitive", lazy = false}, + { "folke/persistence.nvim", + event = "BufReadPre", + config = true, + }, + { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + }, { "nvim-treesitter/nvim-treesitter", lazy = false, @@ -100,7 +111,7 @@ return { enabled = true, auto_trigger = true, keymap = { - accept = "", + accept = "", dismiss = "", }, }, @@ -139,13 +150,25 @@ return { -- CopilotChat { "CopilotC-Nvim/CopilotChat.nvim", - branch = "canary", + branch = "main", dependencies = { { "zbirenbaum/copilot.lua" }, { "nvim-lua/plenary.nvim" }, }, + show_diff = { + full_diff = true + }, opts = { - -- Add any specific options here + model = "claude-3.7-sonnet", + context = "buffer", + border = "rounded", + auto_insert_mode = true, + show_help = false, + mappings = { + submit_prompt = { + insert = '', + }, + }, }, build = nil, -- Disable the build step },