diff --git a/init.lua b/init.lua index 48d31d81..78c9ea86 100644 --- a/init.lua +++ b/init.lua @@ -1,32 +1,9 @@ +vim.g.python3_host_prog = '~/.pyenv/versions/neovim3/bin/python' + require 'plugins' require 'keymaps' require 'config_lsp' --- TODO convert to lua -vim.cmd[[ -let g:python3_host_prog = '~/.pyenv/versions/neovim3/bin/python' - -if executable('ag') - let g:ackprg = 'ag --vimgrep' -endif - -au BufRead,BufNewFile *.ipynb setlocal filetype=json -au BufRead,BufNewFile *.md setlocal spell -au BufRead,BufNewFile *.code-workspace setlocal filetype=json -au BufRead,BufNewFile *.csv setlocal nowrap -au BufRead,BufNewFile *.service[a-zA-Z0-9]* setlocal filetype=systemd -au TermOpen * setlocal nonumber norelativenumber -syntax on - -if &diff - highlight! link DiffText MatchParen -endif -au OptionSet diff highlight! link DiffText MatchParen - -filetype plugin indent on - -]] - vim.notify = require("notify") vim.cmd("colorscheme nightfox") -- TODO @@ -49,3 +26,15 @@ vim.opt.smartindent=true vim.opt.splitbelow=true vim.opt.splitright=true + +-- TODO convert to lua +vim.cmd[[ +au BufRead,BufNewFile *.ipynb setlocal filetype=json +au BufRead,BufNewFile *.md setlocal spell +au BufRead,BufNewFile *.code-workspace setlocal filetype=json +au BufRead,BufNewFile *.csv setlocal nowrap +au BufRead,BufNewFile *.service[a-zA-Z0-9]* setlocal filetype=systemd +au TermOpen * setlocal nonumber norelativenumber +syntax on +filetype plugin indent on +]] diff --git a/lua/keymaps.lua b/lua/keymaps.lua index d25bb643..844d8321 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -13,7 +13,6 @@ end vim.g.mapleader=' ' -- Misc imap('jk','') -nmap('a', ':Ack!') nmap('sr', ':SnipRun') nmap('g', ':G') diff --git a/lua/plugins.lua b/lua/plugins.lua index 813e050e..e9a44c0f 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,22 +1,26 @@ +vim.cmd([[ + augroup packer_user_config + autocmd! + autocmd BufWritePost plugins.lua source | PackerCompile + augroup end +]]) + require('packer').startup(function(use) use 'wbthomason/packer.nvim' use 'rcarriga/nvim-notify' use 'EdenEast/nightfox.nvim' use 'nvim-lua/plenary.nvim' use 'neovim/nvim-lspconfig' - use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' } + use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'} use 'j-hui/fidget.nvim' - use 'mileszs/ack.vim' - use { 'stevearc/aerial.nvim', branch = 'nvim-0.5' } - use 'tpope/vim-unimpaired' - use 'tpope/vim-fugitive' - use 'tpope/vim-commentary' + use {'stevearc/aerial.nvim', branch = 'nvim-0.5'} + use {'tpope/vim-fugitive', opt = true, cmd = {'G', 'Git'}} use 'https://github.com/lewis6991/gitsigns.nvim.git' use 'nvim-lualine/lualine.nvim' use 'kyazdani42/nvim-web-devicons' use 'kyazdani42/nvim-tree.lua' use 'christoomey/vim-tmux-navigator' - use { 'akinsho/toggleterm.nvim', tag = 'v2.*' } + use {'akinsho/toggleterm.nvim', tag = 'v2.*'} use 'hrsh7th/cmp-nvim-lsp' use 'hrsh7th/cmp-buffer' use 'hrsh7th/cmp-path' @@ -25,11 +29,12 @@ require('packer').startup(function(use) use 'hrsh7th/nvim-cmp' use 'hrsh7th/cmp-vsnip' use 'hrsh7th/vim-vsnip' - use { 'nvim-telescope/telescope.nvim', tag = '0.1.0' } - use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' } - use { 'michaelb/sniprun', run = 'bash install.sh' } + use {'nvim-telescope/telescope.nvim', branch = '0.1.x', requires = { {'nvim-lua/plenary.nvim'} }} + use {'nvim-telescope/telescope-fzf-native.nvim', run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'} + use {'michaelb/sniprun', run = 'bash install.sh'} use 'phaazon/hop.nvim' use 'folke/trouble.nvim' + use "lukas-reineke/indent-blankline.nvim" end) require 'config_plugins/config_aerial' @@ -44,3 +49,4 @@ require 'config_plugins/config_toggleterm' require('trouble').setup() require('fidget').setup() require('hop').setup() +require('indent_blankline').setup()