diff options
Diffstat (limited to 'lua')
-rw-r--r-- | lua/linux/init.lua | 4 | ||||
-rw-r--r-- | lua/linux/packer.lua | 41 | ||||
-rw-r--r-- | lua/talha/functions.lua (renamed from lua/linux/functions.lua) | 0 | ||||
-rw-r--r-- | lua/talha/init.lua | 4 | ||||
-rw-r--r-- | lua/talha/packer.lua | 40 | ||||
-rw-r--r-- | lua/talha/remap.lua (renamed from lua/linux/remap.lua) | 6 | ||||
-rw-r--r-- | lua/talha/set.lua (renamed from lua/linux/set.lua) | 0 |
7 files changed, 48 insertions, 47 deletions
diff --git a/lua/linux/init.lua b/lua/linux/init.lua deleted file mode 100644 index 0fbdc54..0000000 --- a/lua/linux/init.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("linux.remap") -require("linux.set") -require("linux.functions") - diff --git a/lua/linux/packer.lua b/lua/linux/packer.lua deleted file mode 100644 index 704531a..0000000 --- a/lua/linux/packer.lua +++ /dev/null @@ -1,41 +0,0 @@ --- TODO: add formatter -vim.cmd [[packadd packer.nvim]] - -return require('packer').startup(function(use) - -- Packer can manage itself - use 'wbthomason/packer.nvim' - - use { - 'nvim-telescope/telescope.nvim', tag = '0.1.2', - -- or , branch = '0.1.x', - requires = { {'nvim-lua/plenary.nvim'} } - } - - - use({ 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }) - - -- colorschemes - use { "ellisonleao/gruvbox.nvim" } - use { "huyvohcmc/atlas.vim" } - use { "yorickpeterse/vim-paper" } - - use('mbbill/undotree') - - use('tpope/vim-fugitive') - - use { - 'VonHeikemen/lsp-zero.nvim', - branch = 'v2.x', - requires = { - -- LSP Support - {'neovim/nvim-lspconfig'}, -- Required - {'williamboman/mason.nvim'}, -- Optional - {'williamboman/mason-lspconfig.nvim'}, -- Optional - - -- Autocompletion - {'hrsh7th/nvim-cmp'}, -- Required - {'hrsh7th/cmp-nvim-lsp'}, -- Required - {'L3MON4D3/LuaSnip'}, -- Required - } - } -end) diff --git a/lua/linux/functions.lua b/lua/talha/functions.lua index 946bfd8..946bfd8 100644 --- a/lua/linux/functions.lua +++ b/lua/talha/functions.lua diff --git a/lua/talha/init.lua b/lua/talha/init.lua new file mode 100644 index 0000000..2babaca --- /dev/null +++ b/lua/talha/init.lua @@ -0,0 +1,4 @@ +require("talha.remap") +require("talha.set") +require("talha.functions") + diff --git a/lua/talha/packer.lua b/lua/talha/packer.lua new file mode 100644 index 0000000..eea7520 --- /dev/null +++ b/lua/talha/packer.lua @@ -0,0 +1,40 @@ +vim.cmd [[packadd packer.nvim]] + +return require('packer').startup(function(use) + -- Packer can manage itself + use 'wbthomason/packer.nvim' + + use { + 'nvim-telescope/telescope.nvim', tag = '0.1.2', + -- or , branch = '0.1.x', + requires = { {'nvim-lua/plenary.nvim'} } + } + + + use({ 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }) + + -- colorschemes + use { "ellisonleao/gruvbox.nvim" } + + use { "theprimeagen/harpoon" } + + use('mbbill/undotree') + + use('tpope/vim-fugitive') + + use { + 'VonHeikemen/lsp-zero.nvim', + branch = 'v2.x', + requires = { + -- LSP Support + {'neovim/nvim-lspconfig'}, -- Required + {'williamboman/mason.nvim'}, -- Optional + {'williamboman/mason-lspconfig.nvim'}, -- Optional + + -- Autocompletion + {'hrsh7th/nvim-cmp'}, -- Required + {'hrsh7th/cmp-nvim-lsp'}, -- Required + {'L3MON4D3/LuaSnip'}, -- Required + } + } +end) diff --git a/lua/linux/remap.lua b/lua/talha/remap.lua index dfc7aca..442ec9d 100644 --- a/lua/linux/remap.lua +++ b/lua/talha/remap.lua @@ -22,14 +22,16 @@ vim.keymap.set("n", "<C-u>", "<C-u>zz") vim.keymap.set("n", "n", "nzzzv") vim.keymap.set("n", "N", "Nzzzv") +vim.keymap.set("x", "<leader>p", "\"_dP") + -- copying to system clipboard vim.keymap.set("n", "<leader>y", [["+y]]) vim.keymap.set("v", "<leader>y", [["+y]]) vim.keymap.set("n", "<leader>Y", [["+Y]]) -- deleting without polluting vim clipboard -vim.keymap.set("n", "<leader>d", [["_d]]) -vim.keymap.set("v", "<leader>d", [["_d]]) +vim.keymap.set({"n", "x"}, "x", [["_x]]) +vim.keymap.set({"n", "x"}, "X", [["_d]]) -- global substitute the word cursor is on in current file vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]]) diff --git a/lua/linux/set.lua b/lua/talha/set.lua index 0366b03..0366b03 100644 --- a/lua/linux/set.lua +++ b/lua/talha/set.lua |