diff --git a/nvim/.config/nvim/after/plugin/trash.txt b/nvim/.config/nvim/after/plugin/trash.txt deleted file mode 100644 index 63905fa..0000000 --- a/nvim/.config/nvim/after/plugin/trash.txt +++ /dev/null @@ -1,30 +0,0 @@ - -print('lsp') - -local lsp = require('lsp-zero').preset({}) - -lsp.on_attach(function(client, bufnr) - -- see :help lsp-zero-keybindings - -- to learn the available actions - lsp.default_keymaps({buffer = bufnr}) -end) - -lsp.setup() - --- You need to setup `cmp` after lsp-zero -local cmp = require('cmp') -local cmp_action = require('lsp-zero').cmp_action() - -cmp.setup({ - mapping = { - -- `Enter` key to confirm completion - -- [''] = cmp.mapping.confirm({select = false}), - - -- Ctrl+Space to trigger completion menu - [''] = cmp.mapping.complete(), - - -- Navigate between snippet placeholder - [''] = cmp_action.luasnip_jump_forward(), - [''] = cmp_action.luasnip_jump_backward(), - } -}) diff --git a/nvim/.config/nvim/lua/lupan/options.lua b/nvim/.config/nvim/lua/lupan/options.lua index 893d047..469514a 100644 --- a/nvim/.config/nvim/lua/lupan/options.lua +++ b/nvim/.config/nvim/lua/lupan/options.lua @@ -10,11 +10,6 @@ vim.wo.relativenumber = true -- Enable mouse mode vim.o.mouse = 'a' --- Sync clipboard between OS and Neovim. --- Remove this option if you want your OS clipboard to remain independent. --- See `:help 'clipboard'` -vim.o.clipboard = 'unnamedplus' - -- Enable break indent vim.o.breakindent = true diff --git a/nvim/.config/nvim/lua/lupan/remap.lua b/nvim/.config/nvim/lua/lupan/remap.lua index f5d133e..8421c36 100644 --- a/nvim/.config/nvim/lua/lupan/remap.lua +++ b/nvim/.config/nvim/lua/lupan/remap.lua @@ -67,6 +67,8 @@ key('n', 'tc', ':tabnew', { desc = '[T]ab [c]reate' }) key('n', 'ts', ':tab split', { desc = '[T]ab [s]plit' }) key('n', 'tn', ':tabnext', { desc = '[T]ab [n]ext' }) key('n', 'tp', ':tabprevious', { desc = '[T]ab [p]revious' }) +key('n', 'tf', ':tabfirst', { desc = '[T]ab [f]irst' }) +key('n', 'tl', ':tablast', { desc = '[T]tab [l]ast' }) key('v', 'J', ":m '>+1gv=gv", { desc = "Move lines down" }) key('v', 'K', ":m '<-2gv=gv", { desc = "Move lines up" }) @@ -139,7 +141,7 @@ for i = 1, 9, 1 do end for i = 1, 9, 1 do - key('n', 't' .. i, function() + key('n', 'T' .. i, function() require("harpoon.term").gotoTerminal(i) end, { desc = '[H]arpoon nav_file [' .. i .. ']' }) end diff --git a/nvim/.config/nvim/lua/plugins/appearance.lua b/nvim/.config/nvim/lua/plugins/appearance.lua new file mode 100644 index 0000000..e58f39c --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/appearance.lua @@ -0,0 +1,41 @@ +return { + -- Colorscheme + { + 'neanias/everforest-nvim', + priority = 1000, + lazy = false, + config = function() + require("everforest").setup({ + background = 'hard', + }) + vim.cmd.colorscheme 'everforest' + end + }, + + { + -- Statusline (see `:help lualine.txt`) + 'nvim-lualine/lualine.nvim', + opts = { + options = { + icons_enabled = false, + theme = 'everforest', + component_separators = '|', + section_separators = '', + }, + }, + }, + + { + -- Indentation guides (see `:help indent_blankline.txt`) + 'lukas-reineke/indent-blankline.nvim', + opts = { + char = '┊', + show_trailing_blankline_indent = false, + }, + }, + + { + 'norcalli/nvim-colorizer.lua', + cmd = 'ColorizerToggle' + }, +} diff --git a/nvim/.config/nvim/lua/plugins/editing.lua b/nvim/.config/nvim/lua/plugins/editing.lua new file mode 100644 index 0000000..db8f8b4 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/editing.lua @@ -0,0 +1,25 @@ +return { + -- "gc" to comment visual regions/lines + { + 'numToStr/Comment.nvim', + opts = {} + }, + + -- Undo browsing + 'mbbill/undotree', + + + -- Tabstops autodetected + 'tpope/vim-sleuth', + + { + "kylechui/nvim-surround", + version = "*", -- Use for stability; omit to use `main` branch for the latest features + event = "VeryLazy", + config = function() + require("nvim-surround").setup({}) + end + }, + + 'ggandor/lightspeed.nvim', +} diff --git a/nvim/.config/nvim/lua/plugins/git.lua b/nvim/.config/nvim/lua/plugins/git.lua new file mode 100644 index 0000000..40f6529 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/git.lua @@ -0,0 +1,29 @@ +return { + -- Git + 'tpope/vim-fugitive', + + { + -- Adds git releated signs to the gutter, as well as utilities for managing changes + 'lewis6991/gitsigns.nvim', + opts = { + -- See `:help gitsigns.txt` + signs = { + add = { text = '+' }, + change = { text = '~' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + }, + on_attach = function(bufnr) + vim.keymap.set('n', 'gp', require('gitsigns').prev_hunk, + { buffer = bufnr, desc = '[G]o to [P]revious Hunk' }) + vim.keymap.set('n', 'gn', require('gitsigns').next_hunk, + { buffer = bufnr, desc = '[G]o to [N]ext Hunk' }) + vim.keymap.set('n', 'ph', require('gitsigns').preview_hunk, + { buffer = bufnr, desc = '[P]review [H]unk' }) + vim.keymap.set('n', 'sh', require('gitsigns').stage_hunk, + { buffer = bufnr, desc = '[S]tage [H]unk' }) + end, + }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index 4384d63..94fde54 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -11,19 +11,6 @@ return { cmd = 'Telescope', }, - -- Colorscheme - { - 'neanias/everforest-nvim', - priority = 1000, - lazy = false, - config = function() - require("everforest").setup({ - background = 'hard', - }) - vim.cmd.colorscheme 'everforest' - end - }, - { 'nvim-treesitter/nvim-treesitter', dependencies = { @@ -34,48 +21,6 @@ return { ':TSUpdate' }, - { - -- Statusline (see `:help lualine.txt`) - 'nvim-lualine/lualine.nvim', - opts = { - options = { - icons_enabled = false, - theme = 'everforest', - component_separators = '|', - section_separators = '', - }, - }, - }, - - { - -- Indentation guides (see `:help indent_blankline.txt`) - 'lukas-reineke/indent-blankline.nvim', - opts = { - char = '┊', - show_trailing_blankline_indent = false, - }, - }, - - -- "gc" to comment visual regions/lines - { - 'numToStr/Comment.nvim', - opts = {} - }, - - { - 'norcalli/nvim-colorizer.lua', - cmd = 'ColorizerToggle' - }, - - -- Undo browsing - 'mbbill/undotree', - - -- Git - 'tpope/vim-fugitive', - - -- Tabstops autodetected - 'tpope/vim-sleuth', - { -- LSP Configuration & Plugins 'neovim/nvim-lspconfig', @@ -111,40 +56,6 @@ return { -- Show pending keybinds { 'folke/which-key.nvim', opts = {} }, - { - -- Adds git releated signs to the gutter, as well as utilities for managing changes - 'lewis6991/gitsigns.nvim', - opts = { - -- See `:help gitsigns.txt` - signs = { - add = { text = '+' }, - change = { text = '~' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - }, - on_attach = function(bufnr) - vim.keymap.set('n', 'gp', require('gitsigns').prev_hunk, - { buffer = bufnr, desc = '[G]o to [P]revious Hunk' }) - vim.keymap.set('n', 'gn', require('gitsigns').next_hunk, - { buffer = bufnr, desc = '[G]o to [N]ext Hunk' }) - vim.keymap.set('n', 'ph', require('gitsigns').preview_hunk, - { buffer = bufnr, desc = '[P]review [H]unk' }) - vim.keymap.set('n', 'sh', require('gitsigns').stage_hunk, - { buffer = bufnr, desc = '[S]tage [H]unk' }) - end, - }, - }, - - { - "kylechui/nvim-surround", - version = "*", -- Use for stability; omit to use `main` branch for the latest features - event = "VeryLazy", - config = function() - require("nvim-surround").setup({}) - end - }, - { 'akinsho/toggleterm.nvim', keys = { '', 'ToggleTerm', desc = 'Toggle term' }, @@ -155,8 +66,6 @@ return { } }, - 'ggandor/lightspeed.nvim', - { 'ThePrimeagen/harpoon', dependencies = { 'nvim-lua/plenary.nvim' },