Add .config/nvim/.luarc.json
Update .config/nvim/init.lua Update .config/nvim/lazy-lock.json Update .config/nvim/lua/config/10_opts.lua Update .config/nvim/lua/config/20_keymaps.lua Add .config/nvim/lua/config/40_statusline.lua Add .config/nvim/lua/plugin/18_align.lua Add .config/nvim/lua/plugin/38_oil.lua Update .config/nvim/lua/plugin/40_ai.lua
This commit is contained in:
parent
9e208ecbe9
commit
941794402e
9 changed files with 117 additions and 60 deletions
|
|
@ -1,42 +1,44 @@
|
|||
-- 10_opts.lua
|
||||
-- stylua: ignore start
|
||||
-- General ===================================
|
||||
vim.g.mapleader = " "
|
||||
vim.o.mouse = ""
|
||||
vim.o.mousescroll = "ver:25,hor:6"
|
||||
vim.o.switchbuf = "usetab"
|
||||
vim.o.undofile = true
|
||||
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.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.colorcolumn = "+1"
|
||||
vim.o.cursorline = true
|
||||
vim.o.linebreak = true
|
||||
vim.o.list = true
|
||||
vim.o.number = 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"
|
||||
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 = ""
|
||||
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
|
||||
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
|
||||
-- Diagnostic ================================
|
||||
vim.diagnostic.config({ virtual_text = true })
|
||||
|
|
|
|||
|
|
@ -16,3 +16,9 @@ nmap_leader('aa', '<Cmd>lua vim.lsp.buf.code_action()<CR>', 'lsp code action'
|
|||
nmap_leader('ar', '<Cmd>lua vim.lsp.buf.rename()<CR>', 'lsp rename')
|
||||
nmap_leader('fi', '<Cmd>lua vim.lsp.buf.implementation()<CR>', 'lsp find implementation')
|
||||
nmap_leader('fr', '<Cmd>lua vim.lsp.buf.references()<CR>', 'lsp find references')
|
||||
|
||||
for i = 1, 6 do
|
||||
nmap_leader(i, i .. "<c-w>w", "move to " .. i)
|
||||
end
|
||||
nmap_leader(';', '<Cmd>vsplit<CR>', 'vsplit')
|
||||
nmap_leader('-', '<Cmd>split<CR>', 'hsplit')
|
||||
|
|
|
|||
20
private_dot_config/nvim/lua/config/40_statusline.lua
Normal file
20
private_dot_config/nvim/lua/config/40_statusline.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-- 40_statusline.lua
|
||||
|
||||
local cmp = {}
|
||||
|
||||
function _G._statusline_component(name)
|
||||
return cmp[name]()
|
||||
end
|
||||
|
||||
function cmp.window()
|
||||
return vim.api.nvim_win_get_number(0)
|
||||
end
|
||||
|
||||
local statusline = {
|
||||
'^%{%v:lua._statusline_component("window")%} ',
|
||||
"%r",
|
||||
"%m",
|
||||
"%=",
|
||||
}
|
||||
|
||||
vim.o.statusline = table.concat(statusline, "")
|
||||
Loading…
Add table
Add a link
Reference in a new issue