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
|
||||
|
||||
> **NOTE**
|
||||
> [Backup](#FAQ) your previous configuration (if any exists)
|
||||
|
||||
External Requirements:
|
||||
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
|
||||
- [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
|
||||
> 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:
|
||||
|
||||
| OS | PATH |
|
||||
@ -79,7 +81,7 @@ nvim
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
|
3
init.lua
3
init.lua
@ -6,6 +6,9 @@ vim.g.maplocalleader = ' '
|
||||
-- Set to true if you have a Nerd Font installed
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- Save start directory as base
|
||||
vim.g.base_dir = vim.fn.getcwd()
|
||||
|
||||
-- [[ Setting options ]]
|
||||
require 'options'
|
||||
|
||||
|
@ -32,11 +32,15 @@ return {
|
||||
-- Open harpoon list window
|
||||
vim.keymap.set('n', '<leader>ho', function()
|
||||
toggle_telescope(harpoon:list())
|
||||
end, { desc = '[H]arpoon [Open]' })
|
||||
end, { desc = '[H]arpoon [O]pen' })
|
||||
-- Append to harpoon list
|
||||
vim.keymap.set('n', '<leader>ha', function()
|
||||
harpoon:list():append()
|
||||
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
|
||||
vim.keymap.set('n', '<C-S-P>', function()
|
||||
harpoon:list():prev()
|
||||
|
@ -1,6 +1,7 @@
|
||||
-- Smooth scroll plugin and keymaps
|
||||
return {
|
||||
'karb94/neoscroll.nvim',
|
||||
enabled = not vim.g.neovide,
|
||||
config = function()
|
||||
require('neoscroll').setup {
|
||||
hide_cursor = false,
|
||||
|
@ -38,7 +38,9 @@ vim.keymap.set({ 'n', 'v' }, '<leader>dny', '"_d', { desc = '[D]elete [N]o [Y]an
|
||||
vim.keymap.set('v', '<leader>pny', '"_dP', { desc = '[P]aste [N]o [Y]ank' })
|
||||
|
||||
-- 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
|
||||
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 {
|
||||
{ -- Autoformat
|
||||
'stevearc/conform.nvim',
|
||||
lazy = false,
|
||||
keys = {
|
||||
{
|
||||
'<leader>f',
|
||||
function()
|
||||
require('conform').format { async = true, lsp_fallback = true }
|
||||
end,
|
||||
mode = '',
|
||||
desc = '[F]ormat buffer',
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
notify_on_error = false,
|
||||
format_on_save = function(bufnr)
|
||||
|
@ -13,16 +13,14 @@ return {
|
||||
-- Installs the debug adapters for you
|
||||
'williamboman/mason.nvim',
|
||||
'jay-babu/mason-nvim-dap.nvim',
|
||||
|
||||
-- Debugger dependencies
|
||||
'leoluz/nvim-dap-go',
|
||||
},
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
|
||||
require('mason-nvim-dap').setup {
|
||||
automatic_setup = true,
|
||||
automatic_installation = true,
|
||||
ensure_installed = {},
|
||||
handlers = {},
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,8 @@ return {
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
}, on_attach = function(bufnr)
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
@ -53,10 +54,8 @@ return {
|
||||
end, { desc = 'reset git hunk' })
|
||||
-- normal mode
|
||||
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>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>hb', function()
|
||||
gs.blame_line { full = false }
|
||||
|
@ -19,6 +19,7 @@ return {
|
||||
'vim',
|
||||
'svelte',
|
||||
'c_sharp',
|
||||
'luadoc',
|
||||
'markdown',
|
||||
'gitcommit',
|
||||
'gitignore',
|
||||
|
@ -28,6 +28,7 @@ return {
|
||||
['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
|
||||
['<leader>b'] = { name = '[B]uffer/[B]reakpoint', _ = '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>h'] = { name = '[H]unk/[H]arpoon', _ = '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.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
|
||||
|
Loading…
Reference in New Issue
Block a user