Improved coloring and indentation.
This commit is contained in:
parent
467dfe21b9
commit
4d4fdb1d25
5 changed files with 92 additions and 24 deletions
|
@ -8,44 +8,68 @@ endif
|
|||
" highlight clear
|
||||
|
||||
let colors_name = "jien"
|
||||
" Main
|
||||
hi Normal guibg=black guifg=lightgray
|
||||
hi Cursor gui=reverse
|
||||
hi TermCursor guibg=red
|
||||
hi CursorLine gui=bold guifg=none guibg=none
|
||||
hi VertSplit gui=bold guifg=yellow
|
||||
|
||||
" Cursor
|
||||
hi Cursor gui=none guifg=red
|
||||
hi iCursor gui=bold guifg=black guibg=red
|
||||
hi TermCursor guibg=red
|
||||
hi CursorLine gui=bold guifg=none guibg=none
|
||||
|
||||
" Information
|
||||
hi Title gui=none guifg=white guibg=gray
|
||||
hi TitleSel gui=bold guifg=white guibg=black
|
||||
hi VertSplit gui=bold guifg=gray
|
||||
hi StatusLine gui=bold guifg=white guibg=green
|
||||
hi StatusLineNC gui=none guifg=black guibg=lightgray
|
||||
|
||||
" Tabs
|
||||
hi TabLine gui=none guibg=lightgray guifg=black
|
||||
hi TabLineSel gui=bold guifg=white guibg=green
|
||||
hi TabLineFill guifg=darkgray
|
||||
|
||||
" Search and comments
|
||||
hi IncSearch gui=bold guifg=black guibg=magenta
|
||||
hi Search gui=none guifg=black guibg=magenta
|
||||
hi Comment gui=none guifg=magenta
|
||||
|
||||
" Popup
|
||||
hi Pmenu gui=none guifg=black guibg=magenta
|
||||
|
||||
" Folding
|
||||
hi Folded gui=none guifg=black guibg=green
|
||||
hi FoldColumn gui=none guifg=yellow guibg=white
|
||||
hi IncSearch gui=none guifg=yellow ctermbg=green
|
||||
|
||||
" Line number
|
||||
hi LineNr guibg=white guifg=black
|
||||
|
||||
hi ModeMsg cterm=none ctermfg=black ctermbg=yellow
|
||||
hi MoreMsg cterm=none ctermfg=darkgreen ctermbg=none
|
||||
hi NonText cterm=none ctermfg=darkgrey ctermbg=none
|
||||
hi Question cterm=none ctermfg=green ctermbg=none
|
||||
hi Search cterm=none ctermfg=black ctermbg=yellow
|
||||
hi SpecialKey cterm=none ctermfg=darkgreen ctermbg=none
|
||||
hi StatusLine gui=bold guifg=black guibg=red
|
||||
hi StatusLineNC guifg=gray
|
||||
hi Title guifg=yellow
|
||||
hi Statement gui=none guifg=magenta
|
||||
hi Visual gui=reverse
|
||||
hi WarningMsg cterm=none ctermfg=1 ctermbg=none
|
||||
|
||||
hi Statement gui=none guifg=yellow
|
||||
hi Function gui=none guifg=yellow guibg=none
|
||||
|
||||
hi String guifg=red
|
||||
hi Constant guifg=red
|
||||
hi Special guifg=blue
|
||||
|
||||
hi Comment guifg=yellow
|
||||
hi Special guifg=lightblue
|
||||
hi Identifier gui=bold guifg=lightgreen
|
||||
hi Include gui=bold guifg=red
|
||||
hi PreProc cterm=none ctermfg=red ctermbg=none
|
||||
hi Operator guifg=lightblue
|
||||
hi Define cterm=none ctermfg=red ctermbg=none
|
||||
|
||||
hi Type guifg=lightgreen cterm=none ctermfg=green ctermbg=none
|
||||
hi Function gui=none guifg=darkmagenta guibg=none
|
||||
hi Structure gui=none guifg=green guibg=none
|
||||
|
||||
hi Operator guifg=lightblue
|
||||
|
||||
hi Include gui=bold guifg=red
|
||||
hi PreProc gui=none guifg=red guibg=none
|
||||
hi Define cterm=none ctermfg=red ctermbg=none
|
||||
|
||||
hi Ignore cterm=none ctermfg=7 ctermbg=none
|
||||
hi Directory cterm=none ctermfg=darkcyan ctermbg=none
|
||||
hi ErrorMsg cterm=none ctermfg=7 ctermbg=1
|
||||
|
@ -55,6 +79,6 @@ hi DiffAdd ctermbg=4 ctermfg=none ctermbg=none
|
|||
hi DiffChange ctermbg=5 ctermfg=none ctermbg=none
|
||||
hi DiffDelete cterm=bold ctermfg=4 ctermbg=6
|
||||
hi DiffText cterm=bold ctermfg=none ctermbg=1
|
||||
hi Underlined cterm=underline ctermfg=5 ctermbg=none
|
||||
hi Underlined guifg=underlined
|
||||
hi Error cterm=none ctermfg=7 ctermbg=1 ctermbg=none
|
||||
hi SpellErrors cterm=bold ctermfg=7 ctermbg=1 ctermbg=none
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
vim.o.smarttab = true
|
||||
-- Surdeus init file.
|
||||
-- surdeus@gmail.com
|
||||
|
||||
vim.o.swapfile = false
|
||||
vim.o.tabstop = 4
|
||||
vim.opt.swapfile = false
|
||||
|
||||
vim.o.number = true
|
||||
vim.o.cursorline = true
|
||||
|
@ -10,6 +10,7 @@ vim.api.nvim_cmd({
|
|||
args = {'jien'},
|
||||
}, {})
|
||||
|
||||
require("indent")
|
||||
require("maps")
|
||||
|
||||
-- Do not put basic things after it,
|
||||
|
@ -39,7 +40,6 @@ require("lazy").setup(plugins, opts)
|
|||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
vim.opt.termguicolors = true
|
||||
require("nvim-tree").setup()
|
||||
require("nvim-tree").setup({
|
||||
sort_by = "case_sensitive",
|
||||
view = {
|
||||
|
@ -51,6 +51,9 @@ require("nvim-tree").setup({
|
|||
filters = {
|
||||
dotfiles = false,
|
||||
},
|
||||
git = {
|
||||
enable=false,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
|
|
37
nvim/lua/indent.lua
Normal file
37
nvim/lua/indent.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
vim.o.autoindent = true
|
||||
vim.o.expandtab = false
|
||||
vim.o.tabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
|
||||
createAutoCmd = vim.api.nvim_create_autocmd
|
||||
|
||||
createAutoCmd({
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},{
|
||||
pattern = "*.js,*.jsx,*.scss,*.css,*.html,*.tmpl,*.tpl",
|
||||
callback = function()
|
||||
local buf = vim.bo[vim.api.nvim_get_current_buf()]
|
||||
buf.expandtab = true
|
||||
buf.shiftwidth=2
|
||||
buf.tabstop=2
|
||||
buf.softtabstop = 0
|
||||
end,
|
||||
})
|
||||
|
||||
createAutoCmd({
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},{
|
||||
pattern = "*.md,*.py",
|
||||
callback = function()
|
||||
local buf = vim.bo[vim.api.nvim_get_current_buf()]
|
||||
buf.expandtab = true
|
||||
buf.shiftwidth=4
|
||||
buf.tabstop=4
|
||||
buf.softtabstop = 0
|
||||
end,
|
||||
})
|
||||
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
vim.o.timeout = false
|
||||
-- Key mapping
|
||||
local map = vim.api.nvim_set_keymap
|
||||
|
||||
|
@ -8,6 +9,8 @@ local opts = {noremap = true, silent = true}
|
|||
map('n', '\\econf', ':e $HOME/lib/nvim/init.lua\n', opts)
|
||||
map('n', '\\rmap', ':source $HOME/lib/nvim/lua/maps.lua\n', opts)
|
||||
map('n', '\\emap', ':e $HOME/lib/nvim/lua/maps.lua\n', opts)
|
||||
map('n', '\\rcolor', ':colorscheme jien\n', opts)
|
||||
map('n', '\\ecolor', ':e $HOME/lib/nvim/colors/jien.vim\n', opts)
|
||||
|
||||
-- File tree.s
|
||||
map('n', '\\home', ":cd $HOME | NvimTreeClose | NvimTreeOpen .;\n", opts)
|
||||
|
@ -18,7 +21,7 @@ local opts = {noremap = true, silent = true}
|
|||
map('n', '\\tn', ':tabnew\n', opts)
|
||||
|
||||
-- Line
|
||||
map('n', '\\nl', ':if &cursorline==1<enter>set nocursorline<enter>else set cursoreline<enter>endif<enter><enter>', opts)
|
||||
-- map('n', '\\nl', ':if &cursorline==1<enter>set nocursorline<enter>else set cursoreline<enter>endif<enter><enter>', opts)
|
||||
|
||||
-- Windows
|
||||
-- Moving
|
||||
|
@ -30,7 +33,7 @@ local opts = {noremap = true, silent = true}
|
|||
-- Resizing
|
||||
map('n', '<C-k>', '<C-w>+', opts)
|
||||
map('n', '<C-j>', '<C-w>-', opts)
|
||||
map('n', '<C-a>', '3<C-w><', opts)
|
||||
map('n', '<C-h>', '3<C-w><', opts)
|
||||
map('n', '<C-l>', '3<C-w>>', opts)
|
||||
-- Splitting
|
||||
map('n', '\\|', '<C-w>v', opts)
|
||||
|
|
|
@ -2,6 +2,7 @@ return {
|
|||
"nvim-tree/nvim-tree.lua",
|
||||
git = {
|
||||
disable = true,
|
||||
enable = false,
|
||||
},
|
||||
version = "*",
|
||||
lazy = false,
|
||||
|
|
Loading…
Reference in a new issue