diff --git a/.config/nvim/dumb.vim b/.config/nvim/dumb.vim index 9a3e09b..f98a19d 100644 --- a/.config/nvim/dumb.vim +++ b/.config/nvim/dumb.vim @@ -1,13 +1,3 @@ -autocmd BufReadPost * -\ if line("'\"") > 1 && line("'\"") <= line("$") | -\ exe "normal! g`\"" | -\ endif - -nmap bi :PaqInstall -nmap bu :PaqUpdate -nmap bc :PaqClean - -noremap g :GitGutterBufferToggle " Open files in horizontal split nnoremap S :call fzf#run({ \ 'down': '40%', @@ -22,14 +12,6 @@ command! -bang -nargs=? -complete=dir Files \ call fzf#vim#files(, {'options': ['--no-color']}, 0) nmap :Files -highlight OverLength ctermfg=red -match OverLength /\%79v.\+/ - -set dir=~/.swaps -set nolist -set ruler -set mouse-=a - au User lsp_setup call lsp#register_server({ \ 'name': 'rust-analyzer', @@ -37,25 +19,12 @@ au User lsp_setup call lsp#register_server({ \ 'allowlist': ['rust'], \ }) -let g:ale_linters = { -\ 'javascript': ['eslint'], -\ 'ruby': ['rubocop26'], -\} - " GitGutter let g:gitgutter_realtime = 1 nmap ,/ :let @/="" let g:go_fmt_command = "goimports" -let g:vimrubocop_keymap = 0 -nmap r :RuboCop - -nnoremap ,o :Files - -nmap 2 :set list! -nmap 3 :set nu! -nmap 4 :set paste! au BufNewFile,BufRead *.md set noai noshowmatch tw=79 au BufNewFile,BufRead *.md setlocal spell spelllang=en_us tw=79 diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 719ff1e..9d2dca9 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,5 +1,6 @@ local execute = vim.api.nvim_command local fn = vim.fn +local cmd = vim.cmd local map = vim.api.nvim_set_keymap local o = vim.o @@ -24,6 +25,7 @@ require("paq") { "ziglang/zig.vim"; "thindil/Ada-Bundle"; + "kyazdani42/nvim-tree.lua"; "nvim-treesitter/nvim-treesitter"; "kristijanhusak/orgmode.nvim"; @@ -48,14 +50,35 @@ require("compe").setup { local lspc = require("lspconfig") lspc.gopls.setup {}; -vim.cmd("syntax off"); -vim.cmd("source ~/.config/nvim/dumb.vim"); +cmd("syntax off"); +cmd("source ~/.config/nvim/dumb.vim"); + +cmd("highlight OverLength ctermfg=red") +cmd("match OverLength /\\%79v.\\+/") + +cmd("set dir=~/.swaps") +cmd("set nolist") +cmd("set ruler") +cmd("set mouse-=a") + o.hlsearch = true; +require'nvim-tree'.setup() + require('orgmode').setup({ org_agenda_files = {'~/org/*'}, org_default_notes_file = '~/org/refile.org', }) +map("i", "", "compe#confirm({ 'keys': '', 'select': v:true })", { expr = true }) +map('n', '', ':NvimTreeToggle', {noremap = true}) +map('n', 'r', ':NvimTreeRefresh', {noremap = true}) +map('n', 'n', ':NvimTreeFindFile', {noremap = true}) +map('n', 'bi', ':PaqInstall', {noremap = true}) +map('n', 'bu', ':PaqUpdate', {noremap = true}) +map('n', 'bc', ':PaqClean', {noremap = true}) -vim.api.nvim_set_keymap("i", "", "compe#confirm({ 'keys': '', 'select': v:true })", { expr = true }) +map('n', '1', ':GitGutterToggle', {noremap = true}) +map('n', '2', ':set list!', {noremap = true}) +map('n', '3', ':set nu!', {noremap = true}) +map('n', '4', ':set paste!', {noremap = true})