Skip to content

Commit

Permalink
changing in init.lua and cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
arpangreat committed Mar 23, 2021
1 parent 4493274 commit 418acb1
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 27 deletions.
80 changes: 80 additions & 0 deletions nvim/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
-- ======================================================================================
-- _____ _ _ _ _
-- / ____| | | (_) | /\ | |
-- | (_____ ____ _ ___| |_ _| | __ / \ ___| |__ __ _ _ __ _ _ _ _ __ _
-- \___ \ \ /\ / / _` / __| __| | |/ / / /\ \ / __| '_ \ / _` | '__| | | | | | |/ _` |
-- ____) \ V V / (_| \__ \ |_| | < / ____ \ (__| | | | (_| | | | |_| | |_| | (_| |
-- |_____/ \_/\_/ \__,_|___/\__|_|_|\_\ /_/ \_\___|_| |_|\__,_|_| \__, |\__, |\__,_|
-- __/ | __/ |
-- |___/ |___/
--
--========================================================================================
vim.cmd("source $HOME/dotfiles/nvim/plugin/plugins.vim")

-- Lua file
-- require('arpangreat')
require('settings')
require('nv-compe')
require('lua-ls')
-- require('nvcoder')
-- require('nv-galaxyline')
require('snippets-nvim')
require('nv-treesitter')
require('nv-nerdcommenter')
require('nv-autopairs')
require('nv-ale')
require('nv-embark')
require('nv-fzf')
require('nv-indentline')
require('nv-nvim-devicons')
require('nv-bufferlines')
require('mappings')
require('nv-startify')
require('nv-airline')
require('nv-rainbow')
require('nv-gitsigns')
-- require('nv-nvim-tree')
require('nv-lsp-configs')

vim.cmd("let g:lsc_auto_map = v:true")
-- let g:airline_theme = 'deus'
vim.cmd("set statusline+=%{get(b:,'gitsigns_status','')}")
--Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
--
--If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support
--(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
vim.cmd([[
if (empty($TMUX))
if (has("nvim"))
"For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
endif
"For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
"Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
if (has("termguicolors"))
set termguicolors
endif
endif
]])

require'nvim_utils'
function nvim_create_augroups()
vim.cmd("au!")
vim.cmd("au TextYankPost * silent! lua require'vim.highlight'.on_yank()")
end
-- Try to prevent bad habits like using the arrow keys for movement. This is
-- not the only possible bad habit. For example, holding down the h/j/k/l keys
-- for movement, rather than using more efficient movement commands, is also a
-- bad habit. The former is enforceable through a .vimrc, while we don't know
-- how to prevent the latter.
-- Do this in normal mode...
vim.cmd('nnoremap <Left> :echoe "Use h"<CR>')
vim.cmd('nnoremap <Right> :echoe "Use l"<CR>')
vim.cmd('nnoremap <Up> :echoe "Use k"<CR>')
vim.cmd('nnoremap <Down> :echoe "Use j"<CR>')
-- ...and in insert mode
vim.cmd('inoremap <Left> <ESC>:echoe "Use h"<CR>')
vim.cmd('inoremap <Right> <ESC>:echoe "Use l"<CR>')
vim.cmd('inoremap <Up> <ESC>:echoe "Use k"<CR>')
vim.cmd('inoremap <Down> <ESC>:echoe "Use j"<CR>')
File renamed without changes.
2 changes: 1 addition & 1 deletion nvim/lua/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ vim.api.nvim_set_keymap('n','<Leader>trc',":lua require('arpangreat.telescope').
-- noremap <leader>pw :Rg <C-R>=expand(--<cword>--)<CR><CR>
vim.api.nvim_set_keymap('n','<Leader>gs',':G<CR>', { noremap = true , silent = false })
vim.api.nvim_set_keymap('n','<Leader>gv',':GitFiles<CR>', { noremap = true , silent = false })
vim.api.nvim_set_keymap('n','<Leader>r',':source %<CR>', { noremap = true , silent = false })
vim.api.nvim_set_keymap('n','<Leader>r',':luafile %<CR>', { noremap = true , silent = false })
vim.api.nvim_set_keymap('n','<Leader>gc',':Git commit<CR>', { noremap = true , silent = false })
vim.api.nvim_set_keymap('n','<Leader>gp',':Git push<CR>', { noremap = true , silent = false })
vim.api.nvim_set_keymap('n','<Leader>gb',':Gblame<CR>', { noremap = true , silent = false })
Expand Down
15 changes: 0 additions & 15 deletions nvim/lua/nv-nerd-git/init.lua

This file was deleted.

11 changes: 0 additions & 11 deletions nvim/lua/nv-nerdtree/init.lua

This file was deleted.

Binary file not shown.
2 changes: 2 additions & 0 deletions nvim/plugin/plugins.vim
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ Plug 'neovim/nvim-lspconfig'
Plug 'nvim-lua/completion-nvim'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'norcalli/nvim_utils'

Plug 'anott03/nvim-lspinstall'
Plug 'dart-lang/dart-vim-plugin'
Plug 'natebosch/vim-lsc'
Expand Down
Binary file modified ~/.vim/undodir/%home%arpangreat%dotfiles%nvim%lua%mappings.lua
Binary file not shown.
Binary file modified ~/.vim/undodir/%home%arpangreat%dotfiles%nvim%plugin%plugins.vim
Binary file not shown.

0 comments on commit 418acb1

Please sign in to comment.