diff --git a/init.lua b/init.lua index bd795e0b..108007fd 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,14 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +vim.opt.termguicolors = true + +vim.opt.spelllang = 'en_us' +vim.opt.spell = true + require("custom.init") -- [[ Install `lazy.nvim` plugin manager ]] -- https://github.com/folke/lazy.nvim @@ -46,7 +54,7 @@ require('lazy').setup({ -- Useful status updates for LSP -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` - { 'j-hui/fidget.nvim', opts = {} }, + { 'j-hui/fidget.nvim', opts = {} }, -- Additional lua configuration, makes nvim stuff amazing! 'folke/neodev.nvim', @@ -82,7 +90,7 @@ require('lazy').setup({ }, -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, + { 'folke/which-key.nvim', opts = {} }, { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', @@ -390,8 +398,8 @@ vim.keymap.set('n', 'sg', require('telescope.builtin').live_grep, { desc vim.keymap.set('n', 'sG', ':LiveGrepGitRoot', { desc = '[S]earch by [G]rep on Git Root' }) vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' }) -vim.keymap.set("n", "ps", function () - require('telescope.builtin').grep_string({ search = vim.fn.input("Grep > ")}) +vim.keymap.set("n", "ps", function() + require('telescope.builtin').grep_string({ search = vim.fn.input("Grep > ") }) end) -- [[ Configure Treesitter ]] -- See `:help nvim-treesitter` diff --git a/lazy-lock.json b/lazy-lock.json index 7559b757..6f64acc6 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,20 +4,28 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "copilot.vim": { "branch": "release", "commit": "79e1a892ca9b4fa6234fd25f2930dba5201700bd" }, "fidget.nvim": { "branch": "main", "commit": "4e854f3299e21d1c18279add340428a97520fc44" }, "friendly-snippets": { "branch": "main", "commit": "dbd45e9ba76d535e4cba88afa1b7aa43bb765336" }, "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, + "gopher.nvim": { "branch": "main", "commit": "ac27f4b6794c872140fb205313d79ab166892fe9" }, "harpoon": { "branch": "harpoon2", "commit": "a38be6e0dd4c6db66997deab71fc4453ace97f9c" }, "indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" }, "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "fe4cce44dec93c69be17dad79b21de867dde118a" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, - "neodev.nvim": { "branch": "main", "commit": "de3685b8c1cd439dd96b7958793f6f381f98652d" }, + "neodev.nvim": { "branch": "main", "commit": "bbe17de89345ce40725e721d347c596dc4a02b32" }, + "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, + "nvim-autopairs": { "branch": "master", "commit": "90f824d37c0cb079d2764927e73af77faa9ba0ef" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, + "nvim-dap": { "branch": "master", "commit": "fc880e82059eb21c0fa896be60146e5f17680648" }, + "nvim-dap-go": { "branch": "main", "commit": "605911fa0899882b05a8e4369ab12739620494af" }, "nvim-lspconfig": { "branch": "master", "commit": "d1bab4cf4b69e49d6058028fd933d8ef5e74e680" }, - "nvim-treesitter": { "branch": "master", "commit": "eb1914bb10dc9b114a61197de0ec58a308c40071" }, + "nvim-tree.lua": { "branch": "master", "commit": "d35a8d5ec6358ada4b058431b367b32360737466" }, + "nvim-treesitter": { "branch": "master", "commit": "3a7b5a9fb46c261b83eadb126463a6e7bdfc8c78" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "7f00d94543f1fd37cab2afa2e9a6cd54e1c6b9ef" }, + "nvim-web-devicons": { "branch": "master", "commit": "14ac5887110b06b89a96881d534230dac3ed134d" }, "onedark.nvim": { "branch": "master", "commit": "1230aaf2a427b2c5b73aba6e4a9a5881d3e69429" }, "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, diff --git a/lua/custom/init.lua b/lua/custom/init.lua index dbbe78a9..bec6e358 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -1,3 +1,2 @@ require("custom.remap") require("custom.set") - diff --git a/lua/custom/plugins/fugative.lua b/lua/custom/plugins/fugative.lua deleted file mode 100644 index d182475f..00000000 --- a/lua/custom/plugins/fugative.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - { - 'vim-fugitive', - keys = { - {'gs', vim.cmd.Git, desc = 'open git'} - } - } -} diff --git a/lua/custom/plugins/gitsigns.lua b/lua/custom/plugins/gitsigns.lua deleted file mode 100644 index ae5381d2..00000000 --- a/lua/custom/plugins/gitsigns.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - 'lewis6991/gitsigns.nvim', - config = function() - require('gitsigns').setup() - vim.keymap.set('n', 'gp', ':Gitsigns preview_hunk', {}) - vim.keymap.set('n', 'gb',':Gitsigns toggle_current_line_blame', {}) - end -} diff --git a/lua/custom/plugins/harpoon.lua b/lua/custom/plugins/harpoon.lua deleted file mode 100644 index 48ac94e8..00000000 --- a/lua/custom/plugins/harpoon.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - { - "theprimeagen/harpoon", - branch = "harpoon2", - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - require("harpoon"):setup() - end, - keys = { - { "A", function() require("harpoon"):list():append() end, desc = "harpoon file", }, - { "a", function() local harpoon = require("harpoon") harpoon.ui:toggle_quick_menu(harpoon:list()) end, desc = "harpoon quick menu", }, - { "1", function() require("harpoon"):list():select(1) end, desc = "harpoon to file 1", }, - { "2", function() require("harpoon"):list():select(2) end, desc = "harpoon to file 2", }, - { "3", function() require("harpoon"):list():select(3) end, desc = "harpoon to file 3", }, - { "4", function() require("harpoon"):list():select(4) end, desc = "harpoon to file 4", }, - { "5", function() require("harpoon"):list():select(5) end, desc = "harpoon to file 5", }, - }, - }, -} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua new file mode 100644 index 00000000..b4980290 --- /dev/null +++ b/lua/custom/plugins/init.lua @@ -0,0 +1,60 @@ +return { + { + 'windwp/nvim-autopairs', + event = "InsertEnter", + opts = {} + }, + { 'github/copilot.vim' }, + { + 'lewis6991/gitsigns.nvim', + config = function() + require('gitsigns').setup() + vim.keymap.set('n', 'gp', ':Gitsigns preview_hunk', {}) + vim.keymap.set('n', 'gb', ':Gitsigns toggle_current_line_blame', {}) + end + }, + { + "theprimeagen/harpoon", + branch = "harpoon2", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + require("harpoon"):setup() + end, + keys = { + { "A", function() require("harpoon"):list():append() end, desc = "harpoon file", }, + { + "a", + function() + local harpoon = require("harpoon") + harpoon.ui:toggle_quick_menu(harpoon:list()) + end, + desc = "harpoon quick menu", + }, + { "1", function() require("harpoon"):list():select(1) end, desc = "harpoon to file 1", }, + { "2", function() require("harpoon"):list():select(2) end, desc = "harpoon to file 2", }, + { "3", function() require("harpoon"):list():select(3) end, desc = "harpoon to file 3", }, + { "4", function() require("harpoon"):list():select(4) end, desc = "harpoon to file 4", }, + { "5", function() require("harpoon"):list():select(5) end, desc = "harpoon to file 5", }, + }, + }, + { + "nvim-tree/nvim-tree.lua", + version = "*", + lazy = false, + dependencies = { + "nvim-tree/nvim-web-devicons", + }, + config = function() + require("nvim-tree").setup {} + end, + keys = { + { 'pv', vim.cmd.NvimTreeToggle, desc = 'Toggle nvim-tree' } + } + }, + { + 'mbbill/undotree', + keys = { + { 'u', vim.cmd.UndotreeToggle, desc = 'toggle undotree' } + } + }, +} diff --git a/lua/custom/plugins/undotree.lua b/lua/custom/plugins/undotree.lua deleted file mode 100644 index 01db41c1..00000000 --- a/lua/custom/plugins/undotree.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - { - 'mbbill/undotree', - keys = { - {'u',vim.cmd.UndotreeToggle, desc = 'toggle undotree'} - } - } -} diff --git a/lua/custom/remap.lua b/lua/custom/remap.lua index da8e50bf..9965286b 100644 --- a/lua/custom/remap.lua +++ b/lua/custom/remap.lua @@ -1,5 +1,3 @@ -vim.keymap.set("n", "pv", vim.cmd.Ex) - vim.keymap.set("v", "J", ":m '>+1gv=gv") vim.keymap.set("v", "K", ":m '<-2gv=gv") @@ -13,10 +11,10 @@ vim.keymap.set("n", "N", "Nzzzv") vim.keymap.set("x", "p", [["_dP]]) -- next greatest remap ever : asbjornHaland -vim.keymap.set({"n", "v"}, "y", [["+y]]) +vim.keymap.set({ "n", "v" }, "y", [["+y]]) vim.keymap.set("n", "Y", [["+Y]]) -vim.keymap.set({"n", "v"}, "d", [["_d]]) +vim.keymap.set({ "n", "v" }, "d", [["_d]]) -- This is going to get me cancelled vim.keymap.set("i", "", "") @@ -39,3 +37,4 @@ vim.keymap.set("n", "mr", "CellularAutomaton make_it_rain"); vim.keymap.set("n", "", function() vim.cmd("so") end) + diff --git a/lua/kickstart/plugins/autoformat.lua b/lua/kickstart/plugins/autoformat.lua index bc56b15b..1bbd622e 100644 --- a/lua/kickstart/plugins/autoformat.lua +++ b/lua/kickstart/plugins/autoformat.lua @@ -46,9 +46,9 @@ return { -- Tsserver usually works poorly. Sorry you work with bad languages -- You can remove this line if you know what you're doing :) - if client.name == 'tsserver' then - return - end + -- if client.name == 'tsserver' then + -- return + -- end -- Create an autocmd that will run *before* we save the buffer. -- Run the formatting command for the LSP that has just attached.