mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-27 05:41:45 +00:00
Compare commits
24 Commits
c27deb9b65
...
cf566a7e20
Author | SHA1 | Date | |
---|---|---|---|
cf566a7e20 | |||
8c3fd068f1 | |||
058e2d8af9 | |||
0a1bb48c9c | |||
bd506fe446 | |||
021d2774e7 | |||
7d2974684e | |||
2e370c9c78 | |||
e0ded1857a | |||
008af722ce | |||
d113c874b3 | |||
efea4df831 | |||
fb97cc5089 | |||
|
e0476d9d69 | ||
|
c4363e4ad8 | ||
|
0ef9368800 | ||
|
19afab1641 | ||
|
3d468e97cd | ||
|
d605b840a2 | ||
|
2cd884a025 | ||
|
1175f6d25a | ||
|
dc9eb06f47 | ||
|
93fde0556e | ||
|
2877a60e00 |
8
.github/pull_request_template.md
vendored
Normal file
8
.github/pull_request_template.md
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
***************************************************************************
|
||||||
|
**NOTE**
|
||||||
|
Please verify that the `base repository` above has the intended destination!
|
||||||
|
Github by default opens Pull Requests against the parent of a forked repository.
|
||||||
|
If this is your personal fork and you didn't intend to open a PR for contribution
|
||||||
|
to the original project then adjust the `base repository` accordingly.
|
||||||
|
**************************************************************************
|
||||||
|
|
10
README.md
10
README.md
@ -15,9 +15,6 @@ If you are experiencing issues, please make sure you have the latest versions.
|
|||||||
|
|
||||||
### Install External Dependencies
|
### Install External Dependencies
|
||||||
|
|
||||||
> **NOTE**
|
|
||||||
> [Backup](#FAQ) your previous configuration (if any exists)
|
|
||||||
|
|
||||||
External Requirements:
|
External Requirements:
|
||||||
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
|
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
|
||||||
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
|
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
|
||||||
@ -30,6 +27,11 @@ External Requirements:
|
|||||||
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
|
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
|
||||||
> and quick install snippets
|
> and quick install snippets
|
||||||
|
|
||||||
|
### Install Kickstart
|
||||||
|
|
||||||
|
> **NOTE**
|
||||||
|
> [Backup](#FAQ) your previous configuration (if any exists)
|
||||||
|
|
||||||
Neovim's configurations are located under the following paths, depending on your OS:
|
Neovim's configurations are located under the following paths, depending on your OS:
|
||||||
|
|
||||||
| OS | PATH |
|
| OS | PATH |
|
||||||
@ -79,7 +81,7 @@ nvim
|
|||||||
```
|
```
|
||||||
|
|
||||||
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
|
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
|
||||||
current plugin status.
|
current plugin status. Hit `q` to close the window.
|
||||||
|
|
||||||
### FAQ
|
### FAQ
|
||||||
|
|
||||||
|
3
init.lua
3
init.lua
@ -6,6 +6,9 @@ vim.g.maplocalleader = ' '
|
|||||||
-- Set to true if you have a Nerd Font installed
|
-- Set to true if you have a Nerd Font installed
|
||||||
vim.g.have_nerd_font = true
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
|
-- Save start directory as base
|
||||||
|
vim.g.base_dir = vim.fn.getcwd()
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
require 'options'
|
require 'options'
|
||||||
|
|
||||||
|
@ -32,11 +32,15 @@ return {
|
|||||||
-- Open harpoon list window
|
-- Open harpoon list window
|
||||||
vim.keymap.set('n', '<leader>ho', function()
|
vim.keymap.set('n', '<leader>ho', function()
|
||||||
toggle_telescope(harpoon:list())
|
toggle_telescope(harpoon:list())
|
||||||
end, { desc = '[H]arpoon [Open]' })
|
end, { desc = '[H]arpoon [O]pen' })
|
||||||
-- Append to harpoon list
|
-- Append to harpoon list
|
||||||
vim.keymap.set('n', '<leader>ha', function()
|
vim.keymap.set('n', '<leader>ha', function()
|
||||||
harpoon:list():append()
|
harpoon:list():append()
|
||||||
end, { desc = '[H]arpoon [A]ppend' })
|
end, { desc = '[H]arpoon [A]ppend' })
|
||||||
|
-- Append to harpoon list
|
||||||
|
vim.keymap.set('n', '<leader>hr', function()
|
||||||
|
harpoon:list():remove()
|
||||||
|
end, { desc = '[H]arpoon [R]emove' })
|
||||||
-- Toggle previous & next buffers stored within Harpoon list
|
-- Toggle previous & next buffers stored within Harpoon list
|
||||||
vim.keymap.set('n', '<C-S-P>', function()
|
vim.keymap.set('n', '<C-S-P>', function()
|
||||||
harpoon:list():prev()
|
harpoon:list():prev()
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
-- Smooth scroll plugin and keymaps
|
-- Smooth scroll plugin and keymaps
|
||||||
return {
|
return {
|
||||||
'karb94/neoscroll.nvim',
|
'karb94/neoscroll.nvim',
|
||||||
|
enabled = not vim.g.neovide,
|
||||||
config = function()
|
config = function()
|
||||||
require('neoscroll').setup {
|
require('neoscroll').setup {
|
||||||
hide_cursor = false,
|
hide_cursor = false,
|
||||||
|
@ -39,6 +39,8 @@ vim.keymap.set('v', '<leader>pny', '"_dP', { desc = '[P]aste [N]o [Y]ank' })
|
|||||||
|
|
||||||
-- Populate CMD to prepare for change directory
|
-- Populate CMD to prepare for change directory
|
||||||
vim.keymap.set('n', '<leader>cd ', ':cd ', { desc = 'Prepare CMD for [C]hange [D]irectory' })
|
vim.keymap.set('n', '<leader>cd ', ':cd ', { desc = 'Prepare CMD for [C]hange [D]irectory' })
|
||||||
|
-- Navigate to 'base' directory, the initial dir that nvim was run in
|
||||||
|
vim.keymap.set('n', '<leader>cdh', '<cmd>cd ' .. vim.g.base_dir .. '<cr>', { desc = '[C]hange [D]irectory to [H]ome' })
|
||||||
|
|
||||||
-- Delete current buffer without closing window
|
-- Delete current buffer without closing window
|
||||||
vim.keymap.set('n', '<leader>bd', '<cmd>bp<bar>sp<bar>bn<bar>bd<cr>', { desc = '[B]uffer [D]elete' })
|
vim.keymap.set('n', '<leader>bd', '<cmd>bp<bar>sp<bar>bn<bar>bd<cr>', { desc = '[B]uffer [D]elete' })
|
||||||
|
@ -1,6 +1,17 @@
|
|||||||
return {
|
return {
|
||||||
{ -- Autoformat
|
{ -- Autoformat
|
||||||
'stevearc/conform.nvim',
|
'stevearc/conform.nvim',
|
||||||
|
lazy = false,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
'<leader>f',
|
||||||
|
function()
|
||||||
|
require('conform').format { async = true, lsp_fallback = true }
|
||||||
|
end,
|
||||||
|
mode = '',
|
||||||
|
desc = '[F]ormat buffer',
|
||||||
|
},
|
||||||
|
},
|
||||||
opts = {
|
opts = {
|
||||||
notify_on_error = false,
|
notify_on_error = false,
|
||||||
format_on_save = function(bufnr)
|
format_on_save = function(bufnr)
|
||||||
|
@ -13,16 +13,14 @@ return {
|
|||||||
-- Installs the debug adapters for you
|
-- Installs the debug adapters for you
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
'jay-babu/mason-nvim-dap.nvim',
|
'jay-babu/mason-nvim-dap.nvim',
|
||||||
|
|
||||||
-- Debugger dependencies
|
|
||||||
'leoluz/nvim-dap-go',
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require 'dap'
|
local dap = require 'dap'
|
||||||
local dapui = require 'dapui'
|
local dapui = require 'dapui'
|
||||||
|
|
||||||
require('mason-nvim-dap').setup {
|
require('mason-nvim-dap').setup {
|
||||||
automatic_setup = true,
|
automatic_installation = true,
|
||||||
|
ensure_installed = {},
|
||||||
handlers = {},
|
handlers = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,8 @@ return {
|
|||||||
delete = { text = '_' },
|
delete = { text = '_' },
|
||||||
topdelete = { text = '‾' },
|
topdelete = { text = '‾' },
|
||||||
changedelete = { text = '~' },
|
changedelete = { text = '~' },
|
||||||
}, on_attach = function(bufnr)
|
},
|
||||||
|
on_attach = function(bufnr)
|
||||||
local gs = package.loaded.gitsigns
|
local gs = package.loaded.gitsigns
|
||||||
|
|
||||||
local function map(mode, l, r, opts)
|
local function map(mode, l, r, opts)
|
||||||
@ -53,10 +54,8 @@ return {
|
|||||||
end, { desc = 'reset git hunk' })
|
end, { desc = 'reset git hunk' })
|
||||||
-- normal mode
|
-- normal mode
|
||||||
map('n', '<leader>hs', gs.stage_hunk, { desc = 'git stage hunk' })
|
map('n', '<leader>hs', gs.stage_hunk, { desc = 'git stage hunk' })
|
||||||
map('n', '<leader>hr', gs.reset_hunk, { desc = 'git reset hunk' })
|
|
||||||
map('n', '<leader>hS', gs.stage_buffer, { desc = 'git Stage buffer' })
|
map('n', '<leader>hS', gs.stage_buffer, { desc = 'git Stage buffer' })
|
||||||
map('n', '<leader>hu', gs.undo_stage_hunk, { desc = 'undo stage hunk' })
|
map('n', '<leader>hu', gs.undo_stage_hunk, { desc = 'undo stage hunk' })
|
||||||
map('n', '<leader>hR', gs.reset_buffer, { desc = 'git Reset buffer' })
|
|
||||||
map('n', '<leader>hp', gs.preview_hunk, { desc = 'preview git hunk' })
|
map('n', '<leader>hp', gs.preview_hunk, { desc = 'preview git hunk' })
|
||||||
map('n', '<leader>hb', function()
|
map('n', '<leader>hb', function()
|
||||||
gs.blame_line { full = false }
|
gs.blame_line { full = false }
|
||||||
|
@ -19,6 +19,7 @@ return {
|
|||||||
'vim',
|
'vim',
|
||||||
'svelte',
|
'svelte',
|
||||||
'c_sharp',
|
'c_sharp',
|
||||||
|
'luadoc',
|
||||||
'markdown',
|
'markdown',
|
||||||
'gitcommit',
|
'gitcommit',
|
||||||
'gitignore',
|
'gitignore',
|
||||||
|
@ -28,6 +28,7 @@ return {
|
|||||||
['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
|
['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
|
||||||
['<leader>b'] = { name = '[B]uffer/[B]reakpoint', _ = 'which_key_ignore' },
|
['<leader>b'] = { name = '[B]uffer/[B]reakpoint', _ = 'which_key_ignore' },
|
||||||
['<leader>c'] = { name = '[C]ode/[C]odeium', _ = 'which_key_ignore' },
|
['<leader>c'] = { name = '[C]ode/[C]odeium', _ = 'which_key_ignore' },
|
||||||
|
['<leader>cd'] = { name = '[D]irectory', _ = 'which_key_ignore' },
|
||||||
['<leader>d'] = { name = '[D]ocument/[D]elete', _ = 'which_key_ignore' },
|
['<leader>d'] = { name = '[D]ocument/[D]elete', _ = 'which_key_ignore' },
|
||||||
['<leader>h'] = { name = '[H]unk/[H]arpoon', _ = 'which_key_ignore' },
|
['<leader>h'] = { name = '[H]unk/[H]arpoon', _ = 'which_key_ignore' },
|
||||||
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
|
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
|
||||||
|
@ -84,4 +84,12 @@ vim.opt.cursorline = true
|
|||||||
vim.opt.scrolloff = 8
|
vim.opt.scrolloff = 8
|
||||||
vim.opt.sidescrolloff = 12
|
vim.opt.sidescrolloff = 12
|
||||||
|
|
||||||
|
-- Options specifically targeted at Neovide
|
||||||
|
if vim.g.neovide then
|
||||||
|
vim.o.guifont = 'CaskaydiaCove Nerd Font Mono:h14'
|
||||||
|
vim.g.neovide_hide_mouse_when_typing = true
|
||||||
|
vim.g.neovide_cursor_animation_length = 0
|
||||||
|
vim.g.neovide_cursor_trail_length = 0
|
||||||
|
end
|
||||||
|
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
Loading…
Reference in New Issue
Block a user