Browse Source

UI changes + treesitter

tags/vimscript-final^0 vimscript-final
Taylor Bockman 1 year ago
parent
commit
fdcbc48713
  1. 4
      README.md
  2. 46
      conf/langs/general.vim
  3. 4
      conf/plugins.vim
  4. 1
      conf/ui.vim

4
README.md

@ -20,6 +20,10 @@ through the use of `vimux` and `vim-tmux-navigator`.
3. [Monospaced Nerd Font](https://www.nerdfonts.com/font-downloads) - The `/font` directory has one I use.
4. `tmux`
## Updating
After running `git pull` you may need to run `:PlugInstall` and restart neovim to resolve any errors.
For Python editing:
1. [Neovim](https://github.com/neovim/neovim) compiled with Python support.

46
conf/langs/general.vim

@ -0,0 +1,46 @@
" General configuration
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'python': ['black', 'flake8'],
\ 'c': ['clang-format'],
\ 'c++': ['clang-format']
\}
let g:ale_fix_on_save = 1
"" Treesitter config.
"" TODO: Remove lua << EOF and EOF when all files are converted
"" to lua.
lua << EOF
require'nvim-treesitter.configs'.setup {
ensure_installed = {
"c",
"lua",
"markdown",
"python",
"query",
"vim",
"vimdoc",
},
-- Prefer asynchronous install for ensure_installed.
sync_install = false,
auto_install = true,
highlight = {
enable = true,
-- Disable for excessively large files.
disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
-- Disable vim regex highlighting. May intefer with some `indent` style stuff.
additional_vim_regex_highlighting = false,
},
}
EOF

4
conf/plugins.vim

@ -18,6 +18,10 @@ Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'ryanoasis/vim-devicons'
Plug 'preservim/nerdtree'
"" This plugin has been archived so if there are problems
"" They may emerge here
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
" General Editing
Plug 'tpope/vim-surround'

1
conf/ui.vim

@ -15,3 +15,4 @@ endif
let NERDTreeShowHidden=1

Loading…
Cancel
Save