Translated vanilla completely
This commit is contained in:
parent
29f798abc7
commit
abee013697
|
@ -1,3 +1,15 @@
|
||||||
|
-- Update function and call
|
||||||
|
function Update_Sys()
|
||||||
|
vim.cmd("Lazy sync")
|
||||||
|
vim.cmd("TSUpdate")
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<M-u>", ":lua Update_Sys()")
|
||||||
|
|
||||||
|
-- Bufstop
|
||||||
|
vim.keymap.set("n", "<M-w>", ":bdelete")
|
||||||
|
vim.keymap.set("n", "<C-y>", ":BufstopFast")
|
||||||
|
|
||||||
-- UltiSnips Configuration
|
-- UltiSnips Configuration
|
||||||
vim.g.UltiSnipsExpandTrigger = "<tab>"
|
vim.g.UltiSnipsExpandTrigger = "<tab>"
|
||||||
vim.g.UltiSnipsJumpForwardTrigger = "<c-l>"
|
vim.g.UltiSnipsJumpForwardTrigger = "<c-l>"
|
||||||
|
@ -7,6 +19,7 @@ vim.g.UltiSnipsSnippetDirectories = { "~/.config/nvim/UltiSnips" }
|
||||||
|
|
||||||
-- NERDTree Config
|
-- NERDTree Config
|
||||||
vim.g.NERDTreeShowHidden = 1
|
vim.g.NERDTreeShowHidden = 1
|
||||||
|
vim.keymap.set("n", "<C-e>", ":NERDTreeToggle<CR>")
|
||||||
|
|
||||||
-- Lexima
|
-- Lexima
|
||||||
vim.g.lexima_enable_basic_rules = 1
|
vim.g.lexima_enable_basic_rules = 1
|
||||||
|
|
|
@ -4,6 +4,12 @@ vim.cmd("filetype on")
|
||||||
vim.cmd("filetype plugin on")
|
vim.cmd("filetype plugin on")
|
||||||
vim.cmd("syntax on")
|
vim.cmd("syntax on")
|
||||||
|
|
||||||
|
-- Spell
|
||||||
|
vim.opt.spell = true
|
||||||
|
vim.opt.spl = "en_us,de_de"
|
||||||
|
vim.opt.sps = "fast,timeout:100"
|
||||||
|
|
||||||
|
|
||||||
-- Editor configuration
|
-- Editor configuration
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.tabstop = 4
|
vim.opt.tabstop = 4
|
||||||
|
@ -12,6 +18,8 @@ vim.opt.expandtab = true
|
||||||
vim.opt.splitright = true
|
vim.opt.splitright = true
|
||||||
vim.opt.splitbelow = true
|
vim.opt.splitbelow = true
|
||||||
vim.g.mapleader = ","
|
vim.g.mapleader = ","
|
||||||
|
vim.cmd("set clipboard+=unnamedplus")
|
||||||
|
vim.cmd("autocmd! CursorHold,CursorHoldI *.md write")
|
||||||
|
|
||||||
-- GUI
|
-- GUI
|
||||||
vim.opt.cursorline = true
|
vim.opt.cursorline = true
|
||||||
|
@ -23,6 +31,9 @@ vim.opt.showmatch = true
|
||||||
|
|
||||||
-- set color scheme
|
-- set color scheme
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
|
vim.cmd("colorscheme slate")
|
||||||
|
vim.keymap.set("n", "<M-+>", ":colo tokyonight-day<CR>")
|
||||||
|
vim.keymap.set("n", "<M-->", ":colo tokyonight-storm<CR>")
|
||||||
|
|
||||||
vim.opt.mouse = ""
|
vim.opt.mouse = ""
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
" NERDTree remap
|
|
||||||
nmap <C-e> :NERDTreeToggle<CR>
|
|
||||||
|
|
||||||
" Autoformat on save
|
" Autoformat on save
|
||||||
augroup FormatAutogroup
|
augroup FormatAutogroup
|
||||||
autocmd!
|
autocmd!
|
||||||
|
@ -8,44 +5,3 @@ augroup FormatAutogroup
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
autocmd BufWritePost *.v lua vim.lsp.buf.format({ async = false })
|
autocmd BufWritePost *.v lua vim.lsp.buf.format({ async = false })
|
||||||
|
|
||||||
nnoremap <silent> <C-0> <Cmd>BufferNext<CR>
|
|
||||||
|
|
||||||
" update function and call
|
|
||||||
function Update_Sys()
|
|
||||||
Lazy sync
|
|
||||||
TSUpdate
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
nnoremap <M-u> :call Update_Sys()<CR>
|
|
||||||
|
|
||||||
" Call build function
|
|
||||||
function! Build()
|
|
||||||
let l:filetype = &filetype
|
|
||||||
|
|
||||||
if l:filetype == 'c' || l:filetype == 'cpp' || l:filetype == 'h' || l:filetype == 'hpp'
|
|
||||||
execute '!make'
|
|
||||||
elseif l:filetype == 'py' || l:filetype == 'python'
|
|
||||||
execute '!python3 %'
|
|
||||||
elseif l:filetype == 'tex'
|
|
||||||
execute '!lualatex % < /dev/null'
|
|
||||||
elseif l:filetype == 'rs'
|
|
||||||
execute 'cargo run'
|
|
||||||
elseif l:filetype == 'S'
|
|
||||||
execute '!make'
|
|
||||||
elseif l:filetype == 'verilog'
|
|
||||||
execute '!verilator --binary %'
|
|
||||||
elseif l:filetype == 'rust'
|
|
||||||
execute '!cargo run'
|
|
||||||
elseif l:filetype == 'markdown'
|
|
||||||
execute '!okular %&'
|
|
||||||
else
|
|
||||||
echo "Unsupported file type: " . l:filetype
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
colorscheme vim-monokai-tasty
|
|
||||||
|
|
||||||
nnoremap <C-b> :call Build()<CR>
|
|
||||||
nnoremap <M-w> :bdelete<CR>
|
|
||||||
nnoremap <C-y> :BufstopFast<CR>
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
" colorscheme vim-monokai-tasty
|
|
||||||
colorscheme slate
|
|
||||||
|
|
||||||
set clipboard+=unnamedplus
|
|
||||||
|
|
||||||
" set spellcheck according to Filetype
|
|
||||||
autocmd VimEnter * set spell spelllang=en_us
|
|
||||||
|
|
||||||
function Litde()
|
|
||||||
set spell spelllang=de_de
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function Liten()
|
|
||||||
set spell spelllang=en_us
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
nnoremap <M-e> :call Liten()<CR>
|
|
||||||
nnoremap <M-g> :call Litde()<CR>
|
|
||||||
|
|
||||||
" Theme
|
|
||||||
nnoremap <M-+> :colo tokyonight-day<CR>
|
|
||||||
nnoremap <M--> :colo tokyonight-storm<CR>
|
|
||||||
|
|
||||||
" Try transparent nvim
|
|
||||||
" highlight Normal guibg=none
|
|
||||||
" highlight NonText guibg=none
|
|
||||||
" highlight Normal ctermbg=none
|
|
||||||
" highlight NonText ctermbg=none
|
|
||||||
|
|
||||||
" Autocmd safe on markdown
|
|
||||||
autocmd! CursorHold,CursorHoldI *.md write
|
|
Loading…
Reference in New Issue