config
This commit is contained in:
parent
47500c80a7
commit
cacd5e29c0
16
init.lua
16
init.lua
|
@ -1,6 +1,14 @@
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
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")
|
require("custom.init")
|
||||||
-- [[ Install `lazy.nvim` plugin manager ]]
|
-- [[ Install `lazy.nvim` plugin manager ]]
|
||||||
-- https://github.com/folke/lazy.nvim
|
-- https://github.com/folke/lazy.nvim
|
||||||
|
@ -46,7 +54,7 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- Useful status updates for LSP
|
-- Useful status updates for LSP
|
||||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
-- 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!
|
-- Additional lua configuration, makes nvim stuff amazing!
|
||||||
'folke/neodev.nvim',
|
'folke/neodev.nvim',
|
||||||
|
@ -82,7 +90,7 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Useful plugin to show you pending keybinds.
|
-- 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
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
|
@ -390,8 +398,8 @@ vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc
|
||||||
vim.keymap.set('n', '<leader>sG', ':LiveGrepGitRoot<cr>', { desc = '[S]earch by [G]rep on Git Root' })
|
vim.keymap.set('n', '<leader>sG', ':LiveGrepGitRoot<cr>', { desc = '[S]earch by [G]rep on Git Root' })
|
||||||
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
|
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||||
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
|
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
|
||||||
vim.keymap.set("n", "<leader>ps", function ()
|
vim.keymap.set("n", "<leader>ps", function()
|
||||||
require('telescope.builtin').grep_string({ search = vim.fn.input("Grep > ")})
|
require('telescope.builtin').grep_string({ search = vim.fn.input("Grep > ") })
|
||||||
end)
|
end)
|
||||||
-- [[ Configure Treesitter ]]
|
-- [[ Configure Treesitter ]]
|
||||||
-- See `:help nvim-treesitter`
|
-- See `:help nvim-treesitter`
|
||||||
|
|
|
@ -4,20 +4,28 @@
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
|
"copilot.vim": { "branch": "release", "commit": "79e1a892ca9b4fa6234fd25f2930dba5201700bd" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "4e854f3299e21d1c18279add340428a97520fc44" },
|
"fidget.nvim": { "branch": "main", "commit": "4e854f3299e21d1c18279add340428a97520fc44" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "dbd45e9ba76d535e4cba88afa1b7aa43bb765336" },
|
"friendly-snippets": { "branch": "main", "commit": "dbd45e9ba76d535e4cba88afa1b7aa43bb765336" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
|
"gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
|
||||||
|
"gopher.nvim": { "branch": "main", "commit": "ac27f4b6794c872140fb205313d79ab166892fe9" },
|
||||||
"harpoon": { "branch": "harpoon2", "commit": "a38be6e0dd4c6db66997deab71fc4453ace97f9c" },
|
"harpoon": { "branch": "harpoon2", "commit": "a38be6e0dd4c6db66997deab71fc4453ace97f9c" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" },
|
"lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
|
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "fe4cce44dec93c69be17dad79b21de867dde118a" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "fe4cce44dec93c69be17dad79b21de867dde118a" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
|
"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-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-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-treesitter-textobjects": { "branch": "master", "commit": "7f00d94543f1fd37cab2afa2e9a6cd54e1c6b9ef" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "14ac5887110b06b89a96881d534230dac3ed134d" },
|
||||||
"onedark.nvim": { "branch": "master", "commit": "1230aaf2a427b2c5b73aba6e4a9a5881d3e69429" },
|
"onedark.nvim": { "branch": "master", "commit": "1230aaf2a427b2c5b73aba6e4a9a5881d3e69429" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
|
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
require("custom.remap")
|
require("custom.remap")
|
||||||
require("custom.set")
|
require("custom.set")
|
||||||
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
'vim-fugitive',
|
|
||||||
keys = {
|
|
||||||
{'<leader>gs', vim.cmd.Git, desc = 'open git'}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
return {
|
|
||||||
'lewis6991/gitsigns.nvim',
|
|
||||||
config = function()
|
|
||||||
require('gitsigns').setup()
|
|
||||||
vim.keymap.set('n', '<leader>gp', ':Gitsigns preview_hunk<CR>', {})
|
|
||||||
vim.keymap.set('n', '<leader>gb',':Gitsigns toggle_current_line_blame<CR>', {})
|
|
||||||
end
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"theprimeagen/harpoon",
|
|
||||||
branch = "harpoon2",
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
|
||||||
config = function()
|
|
||||||
require("harpoon"):setup()
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{ "<leader>A", function() require("harpoon"):list():append() end, desc = "harpoon file", },
|
|
||||||
{ "<leader>a", function() local harpoon = require("harpoon") harpoon.ui:toggle_quick_menu(harpoon:list()) end, desc = "harpoon quick menu", },
|
|
||||||
{ "<leader>1", function() require("harpoon"):list():select(1) end, desc = "harpoon to file 1", },
|
|
||||||
{ "<leader>2", function() require("harpoon"):list():select(2) end, desc = "harpoon to file 2", },
|
|
||||||
{ "<leader>3", function() require("harpoon"):list():select(3) end, desc = "harpoon to file 3", },
|
|
||||||
{ "<leader>4", function() require("harpoon"):list():select(4) end, desc = "harpoon to file 4", },
|
|
||||||
{ "<leader>5", function() require("harpoon"):list():select(5) end, desc = "harpoon to file 5", },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -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', '<leader>gp', ':Gitsigns preview_hunk<CR>', {})
|
||||||
|
vim.keymap.set('n', '<leader>gb', ':Gitsigns toggle_current_line_blame<CR>', {})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"theprimeagen/harpoon",
|
||||||
|
branch = "harpoon2",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
require("harpoon"):setup()
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{ "<leader>A", function() require("harpoon"):list():append() end, desc = "harpoon file", },
|
||||||
|
{
|
||||||
|
"<leader>a",
|
||||||
|
function()
|
||||||
|
local harpoon = require("harpoon")
|
||||||
|
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||||
|
end,
|
||||||
|
desc = "harpoon quick menu",
|
||||||
|
},
|
||||||
|
{ "<leader>1", function() require("harpoon"):list():select(1) end, desc = "harpoon to file 1", },
|
||||||
|
{ "<leader>2", function() require("harpoon"):list():select(2) end, desc = "harpoon to file 2", },
|
||||||
|
{ "<leader>3", function() require("harpoon"):list():select(3) end, desc = "harpoon to file 3", },
|
||||||
|
{ "<leader>4", function() require("harpoon"):list():select(4) end, desc = "harpoon to file 4", },
|
||||||
|
{ "<leader>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 = {
|
||||||
|
{ '<leader>pv', vim.cmd.NvimTreeToggle, desc = 'Toggle nvim-tree' }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'mbbill/undotree',
|
||||||
|
keys = {
|
||||||
|
{ '<leader>u', vim.cmd.UndotreeToggle, desc = 'toggle undotree' }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,8 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
'mbbill/undotree',
|
|
||||||
keys = {
|
|
||||||
{'<leader>u',vim.cmd.UndotreeToggle, desc = 'toggle undotree'}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,3 @@
|
||||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
|
||||||
|
|
||||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||||
|
|
||||||
|
@ -13,10 +11,10 @@ vim.keymap.set("n", "N", "Nzzzv")
|
||||||
vim.keymap.set("x", "<leader>p", [["_dP]])
|
vim.keymap.set("x", "<leader>p", [["_dP]])
|
||||||
|
|
||||||
-- next greatest remap ever : asbjornHaland
|
-- next greatest remap ever : asbjornHaland
|
||||||
vim.keymap.set({"n", "v"}, "<leader>y", [["+y]])
|
vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]])
|
||||||
vim.keymap.set("n", "<leader>Y", [["+Y]])
|
vim.keymap.set("n", "<leader>Y", [["+Y]])
|
||||||
|
|
||||||
vim.keymap.set({"n", "v"}, "<leader>d", [["_d]])
|
vim.keymap.set({ "n", "v" }, "<leader>d", [["_d]])
|
||||||
|
|
||||||
-- This is going to get me cancelled
|
-- This is going to get me cancelled
|
||||||
vim.keymap.set("i", "<C-c>", "<Esc>")
|
vim.keymap.set("i", "<C-c>", "<Esc>")
|
||||||
|
@ -39,3 +37,4 @@ vim.keymap.set("n", "<leader>mr", "<cmd>CellularAutomaton make_it_rain<CR>");
|
||||||
vim.keymap.set("n", "<leader><leader>", function()
|
vim.keymap.set("n", "<leader><leader>", function()
|
||||||
vim.cmd("so")
|
vim.cmd("so")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,9 @@ return {
|
||||||
|
|
||||||
-- Tsserver usually works poorly. Sorry you work with bad languages
|
-- Tsserver usually works poorly. Sorry you work with bad languages
|
||||||
-- You can remove this line if you know what you're doing :)
|
-- You can remove this line if you know what you're doing :)
|
||||||
if client.name == 'tsserver' then
|
-- if client.name == 'tsserver' then
|
||||||
return
|
-- return
|
||||||
end
|
-- end
|
||||||
|
|
||||||
-- Create an autocmd that will run *before* we save the buffer.
|
-- Create an autocmd that will run *before* we save the buffer.
|
||||||
-- Run the formatting command for the LSP that has just attached.
|
-- Run the formatting command for the LSP that has just attached.
|
||||||
|
|
Loading…
Reference in New Issue