Add .config/nvim/lua/config/00_lazy.lua
Add .config/nvim/lua/config/10_opts.lua Add .config/nvim/lua/config/20_keymaps.lua Add .config/nvim/lua/plugin/00_colorscheme.lua Add .config/nvim/lua/plugin/10_hop.lua
This commit is contained in:
parent
d3044efecd
commit
e424803849
5 changed files with 102 additions and 0 deletions
28
private_dot_config/nvim/lua/config/00_lazy.lua
Normal file
28
private_dot_config/nvim/lua/config/00_lazy.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
-- 00_lazy.lua
|
||||||
|
-- Bootstraps lazy.nvim
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
{ out, "WarningMsg" },
|
||||||
|
{ "\nPress any key to exit..." },
|
||||||
|
}, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
{ import = "plugin" },
|
||||||
|
},
|
||||||
|
install = { colorscheme = { "habamax" } },
|
||||||
|
checker = { enabled = true, notify = false },
|
||||||
|
})
|
||||||
41
private_dot_config/nvim/lua/config/10_opts.lua
Normal file
41
private_dot_config/nvim/lua/config/10_opts.lua
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
-- 10_opts.lua
|
||||||
|
-- General =================================
|
||||||
|
vim.g.mapleader = ' '
|
||||||
|
vim.o.mouse = ''
|
||||||
|
vim.o.mousescroll = 'ver:25,hor:6'
|
||||||
|
vim.o.switchbuf = 'usetab'
|
||||||
|
vim.o.undofile = true
|
||||||
|
-- UI ======================================
|
||||||
|
vim.o.breakindent = true
|
||||||
|
vim.o.breakindentopt = 'list:-1'
|
||||||
|
vim.o.colorcolumn = '+1'
|
||||||
|
vim.o.cursorline = true
|
||||||
|
vim.o.linebreak = true
|
||||||
|
vim.o.list = true
|
||||||
|
vim.o.relativenumber = true
|
||||||
|
vim.o.pumheight = 10
|
||||||
|
vim.o.ruler = false
|
||||||
|
vim.o.signcolumn = 'yes'
|
||||||
|
vim.o.splitbelow = true
|
||||||
|
vim.o.splitright = true
|
||||||
|
vim.o.winborder = 'single'
|
||||||
|
vim.o.wrap = false
|
||||||
|
vim.o.cursorlineopt = 'screenline,number'
|
||||||
|
-- Folds ===================================
|
||||||
|
vim.o.foldlevel = 10
|
||||||
|
vim.o.foldmethod = 'indent'
|
||||||
|
vim.o.foldnestmax = 10
|
||||||
|
vim.o.foldtext = ''
|
||||||
|
-- Editing =================================
|
||||||
|
vim.o.autoindent = true
|
||||||
|
vim.o.expandtab = true
|
||||||
|
vim.o.ignorecase = true
|
||||||
|
vim.o.incsearch = true
|
||||||
|
vim.o.infercase = true
|
||||||
|
vim.o.smartcase = true
|
||||||
|
vim.o.smartindent = true
|
||||||
|
vim.o.virtualedit = 'block'
|
||||||
|
vim.o.iskeyword = '@,48-57,_,192-255,-'
|
||||||
|
vim.o.tabstop = 2
|
||||||
|
vim.o.shiftwidth = 2
|
||||||
|
|
||||||
13
private_dot_config/nvim/lua/config/20_keymaps.lua
Normal file
13
private_dot_config/nvim/lua/config/20_keymaps.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
-- 20_keymaps.lua
|
||||||
|
|
||||||
|
-- Helpers ====================================================
|
||||||
|
local nmap = function(lhs, rhs, desc)
|
||||||
|
vim.keymap.set('n', lhs, rhs, { desc = desc })
|
||||||
|
end
|
||||||
|
local nmap_leader = function(lhs, rhs, desc)
|
||||||
|
vim.keymap.set('n', '<Leader>' .. lhs, rhs, { desc = desc })
|
||||||
|
end
|
||||||
|
-- Keymaps ====================================================
|
||||||
|
nmap('[p', '<Cmd>exe "put! " . v:register<CR>', 'Paste above')
|
||||||
|
nmap(']p', '<Cmd>exe "put " . v:register<Cr>', 'Paste below')
|
||||||
|
nmap_leader('ei', '<Cmd>edit $MYVIMRC<CR>', 'init.lua')
|
||||||
8
private_dot_config/nvim/lua/plugin/00_colorscheme.lua
Normal file
8
private_dot_config/nvim/lua/plugin/00_colorscheme.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'oneslash/helix-nvim', version = "*",
|
||||||
|
config = function ()
|
||||||
|
vim.cmd.colorscheme("helix")
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
}
|
||||||
12
private_dot_config/nvim/lua/plugin/10_hop.lua
Normal file
12
private_dot_config/nvim/lua/plugin/10_hop.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'smoka7/hop.nvim',
|
||||||
|
version = "*",
|
||||||
|
opts = {
|
||||||
|
keys = 'etovxqpdygfblzhckisuran'
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "gw", "<cmd>HopWord<CR>", mode = "n", desc = "Hop to word" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue