did this work?
This commit is contained in:
parent
5aeddfdd5d
commit
eca419b2bd
0
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file → Executable file
0
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file → Executable file
0
.github/pull_request_template.md
vendored
Normal file → Executable file
0
.github/pull_request_template.md
vendored
Normal file → Executable file
0
.github/workflows/stylua.yml
vendored
Normal file → Executable file
0
.github/workflows/stylua.yml
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
.stylua.toml
Normal file → Executable file
0
.stylua.toml
Normal file → Executable file
0
LICENSE.md
Normal file → Executable file
0
LICENSE.md
Normal file → Executable file
0
doc/kickstart.txt
Normal file → Executable file
0
doc/kickstart.txt
Normal file → Executable file
98
init.lua
Normal file → Executable file
98
init.lua
Normal file → Executable file
@ -87,11 +87,11 @@ P.S. You can delete this when you're done too. It's your config now! :)
|
|||||||
-- Set <space> as the leader key
|
-- Set <space> as the leader key
|
||||||
-- See `:help mapleader`
|
-- See `:help mapleader`
|
||||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = '<space>'
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = '<space>'
|
||||||
|
|
||||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||||
vim.g.have_nerd_font = false
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.opt`
|
-- See `:help vim.opt`
|
||||||
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
|
|||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
-- You can also add relative line numbers, to help with jumping.
|
-- You can also add relative line numbers, to help with jumping.
|
||||||
-- Experiment for yourself to see if you like it!
|
-- Experiment for yourself to see if you like it!
|
||||||
-- vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
vim.opt.mouse = 'a'
|
vim.opt.mouse = 'a'
|
||||||
@ -113,7 +113,7 @@ vim.opt.showmode = false
|
|||||||
-- Sync clipboard between OS and Neovim.
|
-- Sync clipboard between OS and Neovim.
|
||||||
-- Remove this option if you want your OS clipboard to remain independent.
|
-- Remove this option if you want your OS clipboard to remain independent.
|
||||||
-- See `:help 'clipboard'`
|
-- See `:help 'clipboard'`
|
||||||
vim.opt.clipboard = 'unnamedplus'
|
-- vim.opt.clipboard = 'unnamedplus'
|
||||||
|
|
||||||
-- Enable break indent
|
-- Enable break indent
|
||||||
vim.opt.breakindent = true
|
vim.opt.breakindent = true
|
||||||
@ -176,10 +176,10 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
|
|||||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||||
|
|
||||||
-- TIP: Disable arrow keys in normal mode
|
-- TIP: Disable arrow keys in normal mode
|
||||||
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||||
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||||
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||||
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||||
|
|
||||||
-- Keybinds to make split navigation easier.
|
-- Keybinds to make split navigation easier.
|
||||||
-- Use CTRL+<hjkl> to switch between windows
|
-- Use CTRL+<hjkl> to switch between windows
|
||||||
@ -272,31 +272,29 @@ require('lazy').setup({
|
|||||||
-- Then, because we use the `config` key, the configuration only runs
|
-- Then, because we use the `config` key, the configuration only runs
|
||||||
-- after the plugin has been loaded:
|
-- after the plugin has been loaded:
|
||||||
-- config = function() ... end
|
-- config = function() ... end
|
||||||
|
--
|
||||||
{ -- Useful plugin to show you pending keybinds.
|
-- { -- Useful plugin to show you pending keybinds.
|
||||||
'folke/which-key.nvim',
|
-- 'folke/which-key.nvim',
|
||||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
-- event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||||
config = function() -- This is the function that runs, AFTER loading
|
-- config = function() -- This is the function that runs, AFTER loading
|
||||||
require('which-key').setup()
|
-- require('which-key').setup()
|
||||||
|
--
|
||||||
-- Document existing key chains
|
-- -- Document existing key chains
|
||||||
require('which-key').register {
|
-- require('which-key').register {
|
||||||
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
|
-- -- ['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
|
||||||
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
-- -- ['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
||||||
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
-- -- ['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
||||||
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
-- -- ['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
||||||
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
-- -- ['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||||
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
|
-- -- ['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
|
||||||
['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' },
|
-- -- ['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' },
|
||||||
}
|
-- }
|
||||||
-- visual mode
|
--
|
||||||
require('which-key').register({
|
-- -- visual mode
|
||||||
['<leader>h'] = { 'Git [H]unk' },
|
-- -- require('which-key').register({ ['<leader>h'] = { 'Git [H]unk' } }, { mode = 'v' })
|
||||||
}, { mode = 'v' })
|
-- end,
|
||||||
end,
|
-- },
|
||||||
},
|
-- -- NOTE: Plugins can specify dependencies.
|
||||||
|
|
||||||
-- NOTE: Plugins can specify dependencies.
|
|
||||||
--
|
--
|
||||||
-- The dependencies are proper plugin specifications as well - anything
|
-- The dependencies are proper plugin specifications as well - anything
|
||||||
-- you do for a plugin at the top level, you can do for a dependency.
|
-- you do for a plugin at the top level, you can do for a dependency.
|
||||||
@ -353,11 +351,11 @@ require('lazy').setup({
|
|||||||
-- You can put your default mappings / updates / etc. in here
|
-- You can put your default mappings / updates / etc. in here
|
||||||
-- All the info you're looking for is in `:help telescope.setup()`
|
-- All the info you're looking for is in `:help telescope.setup()`
|
||||||
--
|
--
|
||||||
-- defaults = {
|
defaults = {
|
||||||
-- mappings = {
|
mappings = {
|
||||||
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
|
i = { ['<c-enter>'] = 'to_fuzzy_refine' },
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- pickers = {}
|
-- pickers = {}
|
||||||
extensions = {
|
extensions = {
|
||||||
['ui-select'] = {
|
['ui-select'] = {
|
||||||
@ -566,8 +564,8 @@ require('lazy').setup({
|
|||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
gopls = {},
|
||||||
-- pyright = {},
|
pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
--
|
--
|
||||||
@ -653,11 +651,11 @@ require('lazy').setup({
|
|||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
-- python = { "isort", "black" },
|
python = { 'isort', 'black' },
|
||||||
--
|
--
|
||||||
-- You can use a sub-list to tell conform to run *until* a formatter
|
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||||
-- is found.
|
-- is found.
|
||||||
-- javascript = { { "prettierd", "prettier" } },
|
javascript = { { 'prettierd', 'prettier' } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -873,19 +871,19 @@ require('lazy').setup({
|
|||||||
-- Here are some example plugins that I've included in the Kickstart repository.
|
-- Here are some example plugins that I've included in the Kickstart repository.
|
||||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||||
--
|
--
|
||||||
-- require 'kickstart.plugins.debug',
|
require 'kickstart.plugins.debug',
|
||||||
-- require 'kickstart.plugins.indent_line',
|
require 'kickstart.plugins.indent_line',
|
||||||
-- require 'kickstart.plugins.lint',
|
require 'kickstart.plugins.lint',
|
||||||
-- require 'kickstart.plugins.autopairs',
|
require 'kickstart.plugins.autopairs',
|
||||||
-- require 'kickstart.plugins.neo-tree',
|
require 'kickstart.plugins.neo-tree',
|
||||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||||
|
|
||||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
-- This is the easiest way to modularize your config.
|
-- This is the easiest way to modularize your config.
|
||||||
--
|
--
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||||
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
||||||
-- { import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
}, {
|
}, {
|
||||||
ui = {
|
ui = {
|
||||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||||
|
55
lua/custom/plugins/init.lua
Normal file → Executable file
55
lua/custom/plugins/init.lua
Normal file → Executable file
@ -2,4 +2,57 @@
|
|||||||
-- I promise not to create any merge conflicts in this directory :)
|
-- I promise not to create any merge conflicts in this directory :)
|
||||||
--
|
--
|
||||||
-- See the kickstart.nvim README for more information
|
-- See the kickstart.nvim README for more information
|
||||||
return {}
|
return {
|
||||||
|
{
|
||||||
|
'ThePrimeagen/harpoon',
|
||||||
|
branch = 'harpoon2',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'ThePrimeagen/vim-be-good',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'mbbill/undotree',
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'tpope/vim-fugitive',
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set('n', '<leader>gs', vim.cmd.Git)
|
||||||
|
|
||||||
|
local ThePrimeagen_Fugitive = vim.api.nvim_create_augroup('ThePrimeagen_Fugitive', {})
|
||||||
|
|
||||||
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
|
autocmd('BufWinEnter', {
|
||||||
|
group = ThePrimeagen_Fugitive,
|
||||||
|
pattern = '*',
|
||||||
|
callback = function()
|
||||||
|
if vim.bo.ft ~= 'fugitive' then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local bufnr = vim.api.nvim_get_current_buf()
|
||||||
|
local opts = { buffer = bufnr, remap = false }
|
||||||
|
vim.keymap.set('n', '<leader>p', function()
|
||||||
|
vim.cmd.Git 'push'
|
||||||
|
end, opts)
|
||||||
|
|
||||||
|
-- rebase always
|
||||||
|
vim.keymap.set('n', '<leader>P', function()
|
||||||
|
vim.cmd.Git { 'pull', '--rebase' }
|
||||||
|
end, opts)
|
||||||
|
|
||||||
|
-- NOTE: It allows me to easily set the branch i am pushing and any tracking
|
||||||
|
-- needed if i did not set the branch up correctly
|
||||||
|
vim.keymap.set('n', '<leader>t', ':Git push -u origin ', opts)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set('n', 'gu', '<cmd>diffget //2<CR>')
|
||||||
|
vim.keymap.set('n', 'gh', '<cmd>diffget //3<CR>')
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
0
lua/kickstart/health.lua
Normal file → Executable file
0
lua/kickstart/health.lua
Normal file → Executable file
0
lua/kickstart/plugins/autopairs.lua
Normal file → Executable file
0
lua/kickstart/plugins/autopairs.lua
Normal file → Executable file
0
lua/kickstart/plugins/debug.lua
Normal file → Executable file
0
lua/kickstart/plugins/debug.lua
Normal file → Executable file
0
lua/kickstart/plugins/gitsigns.lua
Normal file → Executable file
0
lua/kickstart/plugins/gitsigns.lua
Normal file → Executable file
0
lua/kickstart/plugins/indent_line.lua
Normal file → Executable file
0
lua/kickstart/plugins/indent_line.lua
Normal file → Executable file
0
lua/kickstart/plugins/lint.lua
Normal file → Executable file
0
lua/kickstart/plugins/lint.lua
Normal file → Executable file
0
lua/kickstart/plugins/neo-tree.lua
Normal file → Executable file
0
lua/kickstart/plugins/neo-tree.lua
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user