🏷️ Update(lualine): Update lualine
also clean up code
This commit is contained in:
parent
828431ef70
commit
1cda15e20b
4
init.lua
4
init.lua
@ -1,6 +1,4 @@
|
||||
-- source options
|
||||
-- source options and mappings
|
||||
require('core')
|
||||
-- load mappings
|
||||
require('mappings')
|
||||
-- load plugins and its options
|
||||
require('lazy-plugins')
|
||||
|
44
lua/core.lua
44
lua/core.lua
@ -1,25 +1,57 @@
|
||||
-- CORE SETTINGS
|
||||
local o = vim.o
|
||||
local global = vim.g
|
||||
local map = vim.keymap.set
|
||||
|
||||
-- look and feel
|
||||
global.netrw_bufsettings = "noma nomod relativenumber nowrap ro nobl"
|
||||
o.number = true
|
||||
o.relativenumber = true
|
||||
o.ruler = true
|
||||
o.scrolloff = 10
|
||||
o.showmode = false
|
||||
o.spell = true
|
||||
global.netrw_bufsettings = "noma nomod relativenumber nowrap ro nobl"
|
||||
|
||||
-- controlling
|
||||
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
||||
global.mapleader = ' '
|
||||
o.autoindent = true
|
||||
o.ignorecase = true
|
||||
o.smartcase = true
|
||||
o.smartindent = true
|
||||
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
||||
|
||||
-- leader settings
|
||||
global.mapleader = ' '
|
||||
-- vscode
|
||||
if vim.g.vscode then
|
||||
-- undo/REDO via vscode
|
||||
map("n", "u", "<Cmd>call VSCodeNotify('undo')<CR>")
|
||||
map("n", "<C-r>", "<Cmd>call VSCodeNotify('redo')<CR>")
|
||||
map("n", "gf", "<Cmd>call VSCodeCall('editor.action.openLink')<CR>", { noremap = true })
|
||||
end
|
||||
|
||||
-- env settings for plugins
|
||||
global.tagbar_sort = 0
|
||||
-- generic mappings
|
||||
map('v', '<', '<gv', { noremap = true })
|
||||
map('v', '>', '>gv', { noremap = true })
|
||||
map('n', 'Y', 'y$', { noremap = true })
|
||||
map('n', 'n', 'nzzzv', { noremap = true })
|
||||
map('n', 'N', 'Nzzzv', { noremap = true })
|
||||
|
||||
-- Shortcutting split navigation
|
||||
map('', '<A-h>', '<C-w>h')
|
||||
map('', '<A-j>', '<C-w>j')
|
||||
map('', '<A-k>', '<C-w>k')
|
||||
map('', '<A-l>', '<C-w>l')
|
||||
map('', '<A-H>', '<C-w>H')
|
||||
map('', '<A-J>', '<C-w>J')
|
||||
map('', '<A-K>', '<C-w>K')
|
||||
map('', '<A-L>', '<C-w>L')
|
||||
map('', '<M-S-.>', '<C-w>>')
|
||||
map('', '<M-S-,>', '<C-w><')
|
||||
map('', '<M-S-=>', '<C-w>+')
|
||||
map('', '<M-->', '<C-w>-')
|
||||
map('', '<A-T>', '<C-w>T')
|
||||
|
||||
-- undo to the last , . or !
|
||||
map('i', ',', ',<c-g>u', { noremap = true })
|
||||
map('i', '.', '.<c-g>u', { noremap = true })
|
||||
map('i', '!', '!<c-g>u', { noremap = true })
|
||||
map('i', '?', '?<c-g>u', { noremap = true })
|
||||
|
@ -1,37 +0,0 @@
|
||||
local map = vim.keymap.set
|
||||
|
||||
-- vscode
|
||||
if vim.g.vscode then
|
||||
-- undo/REDO via vscode
|
||||
map("n", "u", "<Cmd>call VSCodeNotify('undo')<CR>")
|
||||
map("n", "<C-r>", "<Cmd>call VSCodeNotify('redo')<CR>")
|
||||
map("n", "gf", "<Cmd>call VSCodeCall('editor.action.openLink')<CR>", { noremap = true })
|
||||
end
|
||||
|
||||
-- generic mappings
|
||||
map('v', '<', '<gv', { noremap = true })
|
||||
map('v', '>', '>gv', { noremap = true })
|
||||
map('n', 'Y', 'y$', { noremap = true })
|
||||
map('n', 'n', 'nzzzv', { noremap = true })
|
||||
map('n', 'N', 'Nzzzv', { noremap = true })
|
||||
|
||||
-- Shortcutting split navigation
|
||||
map('', '<A-h>', '<C-w>h')
|
||||
map('', '<A-j>', '<C-w>j')
|
||||
map('', '<A-k>', '<C-w>k')
|
||||
map('', '<A-l>', '<C-w>l')
|
||||
map('', '<A-H>', '<C-w>H')
|
||||
map('', '<A-J>', '<C-w>J')
|
||||
map('', '<A-K>', '<C-w>K')
|
||||
map('', '<A-L>', '<C-w>L')
|
||||
map('', '<M-S-.>', '<C-w>>')
|
||||
map('', '<M-S-,>', '<C-w><')
|
||||
map('', '<M-S-=>', '<C-w>+')
|
||||
map('', '<M-->', '<C-w>-')
|
||||
map('', '<A-T>', '<C-w>T')
|
||||
|
||||
-- undo to the last , . or !
|
||||
map('i', ',', ',<c-g>u', { noremap = true })
|
||||
map('i', '.', '.<c-g>u', { noremap = true })
|
||||
map('i', '!', '!<c-g>u', { noremap = true })
|
||||
map('i', '?', '?<c-g>u', { noremap = true })
|
@ -2,8 +2,8 @@ require 'lualine'.setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'gruvbox',
|
||||
component_separators = { '|', '|' },
|
||||
section_separators = { '', '' },
|
||||
component_separators = { left = "", right = "|" },
|
||||
section_separators = "",
|
||||
disabled_filetypes = {}
|
||||
},
|
||||
sections = {
|
||||
@ -12,10 +12,7 @@ require 'lualine'.setup {
|
||||
'branch',
|
||||
},
|
||||
lualine_c = {
|
||||
{
|
||||
'filename',
|
||||
path = 1
|
||||
},
|
||||
{ 'filename', path = 1 },
|
||||
'diff',
|
||||
},
|
||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||
|
Loading…
Reference in New Issue
Block a user