Updated dotfiles, but not complete and still need installation script updates.
This commit is contained in:
parent
a1feaeb14e
commit
e7a6bacc19
11 changed files with 139 additions and 30 deletions
11
neovim/after/plugin/nvim-lint.vim
Normal file
11
neovim/after/plugin/nvim-lint.vim
Normal file
|
@ -0,0 +1,11 @@
|
|||
lua << EOF
|
||||
require('lint').linters_by_ft = {
|
||||
markdown = {'vale',},
|
||||
html = {'tidy',},
|
||||
vim = {'vint',},
|
||||
yaml = {'yamllint'},
|
||||
}
|
||||
EOF
|
||||
|
||||
" Run linting after buffer write
|
||||
au BufWritePost <buffer> lua require('lint').try_lint()
|
5
neovim/after/plugin/nvim-web-devicons.vim
Normal file
5
neovim/after/plugin/nvim-web-devicons.vim
Normal file
|
@ -0,0 +1,5 @@
|
|||
lua << EOF
|
||||
require'nvim-web-devicons'.setup {
|
||||
default = true;
|
||||
}
|
||||
EOF
|
14
neovim/after/plugin/telescope.nvim.vim
Normal file
14
neovim/after/plugin/telescope.nvim.vim
Normal file
|
@ -0,0 +1,14 @@
|
|||
lua << EOF
|
||||
local actions = require("telescope.actions")
|
||||
local trouble = require("trouble.providers.telescope")
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = { ["<c-t>"] = trouble.open_with_trouble },
|
||||
n = { ["<c-t>"] = trouble.open_with_trouble },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
require('telescope').load_extension('fzf')
|
||||
EOF
|
5
neovim/after/plugin/trouble.nvim.vim
Normal file
5
neovim/after/plugin/trouble.nvim.vim
Normal file
|
@ -0,0 +1,5 @@
|
|||
lua << EOF
|
||||
require("trouble").setup {
|
||||
-- empty = default settings
|
||||
}
|
||||
EOF
|
2
neovim/after/plugin/vim-gitgutter.vim
Normal file
2
neovim/after/plugin/vim-gitgutter.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
" Let other signs (e.g. linter errors) take precedence over gitgutter
|
||||
let g:gitgutter_sign_allow_clobber = 0
|
3
neovim/after/plugin/vimtex.vim
Normal file
3
neovim/after/plugin/vimtex.vim
Normal file
|
@ -0,0 +1,3 @@
|
|||
" If the format cannot be determined, use this.
|
||||
let g:tex_flavor = "latex"
|
||||
let g:vimtex_view_method = 'zathura'
|
|
@ -4,28 +4,46 @@ call plug#begin('~/.local/share/nvim/plugged')
|
|||
" Key usability plugins
|
||||
" =============================================================================
|
||||
|
||||
" FZF Fuzzy Search
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
" FZF Native for Telescope
|
||||
Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'make' }
|
||||
|
||||
" Floating terminal support for Neovim
|
||||
Plug 'voldikss/vim-floaterm'
|
||||
|
||||
" Neovim LSP
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
|
||||
" Treesitter
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
|
||||
" Plenary - lua components used by other plugins
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
|
||||
" Neovim LSP
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
|
||||
" Completion
|
||||
Plug 'hrsh7th/cmp-nvim-lsp' " Builtin LSP as a completion source
|
||||
Plug 'hrsh7th/cmp-path' " Support for path as a completion source
|
||||
Plug 'hrsh7th/cmp-buffer' " Support for loaded buffers as completion source
|
||||
Plug 'hrsh7th/nvim-cmp' " Primary plugin
|
||||
|
||||
" Treesitter
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
|
||||
" telescope.nvim
|
||||
" Gaze deeply into unknown regions using the power of the moon.
|
||||
Plug 'nvim-telescope/telescope.nvim'
|
||||
|
||||
" trouble.nvim
|
||||
" A pretty list for showing diagnostics, references, telescope results, quickfix
|
||||
" and location lists to help you solve all the trouble your code is causing.
|
||||
Plug 'folke/trouble.nvim'
|
||||
|
||||
" nvim-lint (compatible with Neovim LSP)
|
||||
" nvim-lint is meant to fill the gaps for languages where either no language
|
||||
" server exists, or where standalone linters provide better results than the
|
||||
" available language server do.
|
||||
Plug 'mfussenegger/nvim-lint'
|
||||
|
||||
" vim-gitgutter
|
||||
" A Vim plugin which shows a git diff in the sign column.
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
|
||||
" =============================================================================
|
||||
" Languages and project type support.
|
||||
" =============================================================================
|
||||
|
@ -46,6 +64,9 @@ Plug 'ziglang/zig.vim', { 'for': ['zig'] }
|
|||
" Note: Metals should not be configured with the other LSP items.
|
||||
Plug 'scalameta/nvim-metals', { 'for': ['scala', 'sbt'] }
|
||||
|
||||
" LaTeX Support
|
||||
Plug 'lervag/vimtex', { 'for': ['tex'] }
|
||||
|
||||
" =============================================================================
|
||||
" Visual enhancements
|
||||
" =============================================================================
|
||||
|
@ -53,14 +74,22 @@ Plug 'scalameta/nvim-metals', { 'for': ['scala', 'sbt'] }
|
|||
Plug 'sainnhe/gruvbox-material'
|
||||
" Plug 'rebelot/kanagawa.nvim'
|
||||
|
||||
Plug 'kyazdani42/nvim-web-devicons'
|
||||
Plug 'folke/lsp-colors.nvim'
|
||||
|
||||
call plug#end()
|
||||
|
||||
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
filetype plugin indent on
|
||||
syntax on
|
||||
let mapleader=","
|
||||
let maplocalleader=","
|
||||
|
||||
" Only allow syntax to be set once.
|
||||
if !exists('g:syntax_on')
|
||||
syntax enable
|
||||
endif
|
||||
|
||||
let mapleader=','
|
||||
let maplocalleader=','
|
||||
|
||||
" === Color Scheme === {{
|
||||
set termguicolors
|
||||
|
@ -80,7 +109,6 @@ set undodir=~/.config/nvim/undo
|
|||
|
||||
" === Assorted Core Settings === {{
|
||||
set noswapfile
|
||||
set nocompatible
|
||||
set modelines=0
|
||||
set hidden " Hide buffers
|
||||
set encoding=utf-8 " Always use UTF-8 explicitly
|
||||
|
@ -100,6 +128,8 @@ set colorcolumn=80 " Right margin display
|
|||
set shortmess-=F " Ensure audocmd works for filetype
|
||||
set shortmess+=c " Avoid showing extra message when using completion
|
||||
set spelllang=en_us
|
||||
set signcolumn=yes
|
||||
set updatetime=200
|
||||
" }}
|
||||
|
||||
" === Basic Completion Settings === {{
|
||||
|
@ -135,10 +165,6 @@ set wildignore+=*/.metals/*,*/.bloop/*,*/.bsp/*
|
|||
set wildignore+=*/node_modules/*
|
||||
" }}
|
||||
|
||||
" === FZF Configuration === {{
|
||||
let $FZF_DEFAULT_COMMAND='rg --files --no-messages "" .'
|
||||
" }}
|
||||
|
||||
" === Key Mappings === {{
|
||||
|
||||
" Use Tab and Shift+Tab to navigate popup menus
|
||||
|
@ -166,8 +192,23 @@ nmap ; :Buffers<CR>
|
|||
" Press Ctrl+P to show a list of files (+ fuzzy search)
|
||||
nmap <C-p> :Files<CR>
|
||||
|
||||
" Press <leader> + f to use ripgrep for search
|
||||
nmap <leader>f :Rg<space>
|
||||
" Telescope Bindings (e.g. file and buffer search)
|
||||
nnoremap <C-p> <cmd>Telescope find_files<cr>
|
||||
nnoremap ; <cmd>Telescope buffers<cr>
|
||||
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
|
||||
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
|
||||
|
||||
" Trouble bindings
|
||||
nnoremap <leader>xx <cmd>TroubleToggle<cr>
|
||||
nnoremap <leader>xw <cmd>TroubleToggle workspace_diagnostics<cr>
|
||||
nnoremap <leader>xd <cmd>TroubleToggle document_diagnostics<cr>
|
||||
nnoremap <leader>xq <cmd>TroubleToggle quickfix<cr>
|
||||
nnoremap <leader>xl <cmd>TroubleToggle loclist<cr>
|
||||
nnoremap gR <cmd>TroubleToggle lsp_references<cr>
|
||||
|
||||
" gitgutter bindings
|
||||
nmap ]h <Plug>(GitGutterNextHunk)
|
||||
nmap [h <Plug>(GitGutterPrevHunk)
|
||||
|
||||
" LSP key bindings
|
||||
nnoremap <silent> K <cmd>lua vim.lsp.buf.hover()<CR>
|
||||
|
@ -191,13 +232,6 @@ map <C-h> <C-w>h
|
|||
map <C-l> <C-w>l
|
||||
" }}
|
||||
|
||||
" === JSON Support === {{
|
||||
|
||||
" Properly handle comments in JSON.
|
||||
autocmd FileType json syntax match Comment +\/\/.\+$+
|
||||
|
||||
" }}
|
||||
|
||||
" === netrw === {{
|
||||
let g:netrw_banner = 0
|
||||
let g:netrw_liststyle = 3
|
||||
|
@ -260,6 +294,7 @@ end
|
|||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||
|
||||
-- zls = zig language server
|
||||
lsp.zls.setup {
|
||||
on_attach = on_attach,
|
||||
flags = {
|
||||
|
@ -268,6 +303,9 @@ lsp.zls.setup {
|
|||
capabilities = capabilities
|
||||
}
|
||||
|
||||
-- texlab = latex language server
|
||||
lsp.texlab.setup{}
|
||||
|
||||
-- Note that metals is totally separate.
|
||||
-- It's also absurdly slow on a Raspberry Pi, it's only viable for somewhat
|
||||
-- powerful machines (as is Scala dev in general).
|
||||
|
|
6
neovim/json.vim
Normal file
6
neovim/json.vim
Normal file
|
@ -0,0 +1,6 @@
|
|||
" === JSON Support === {{
|
||||
|
||||
" Properly handle comments in JSON.
|
||||
autocmd FileType json syntax match Comment +\/\/.\+$+
|
||||
|
||||
" }}
|
9
neovim/tex.vim
Normal file
9
neovim/tex.vim
Normal file
|
@ -0,0 +1,9 @@
|
|||
" === Tex / LaTeX Support === {{
|
||||
|
||||
" Default tex flavor to use if not detected.
|
||||
let g:tex_flavor = "latex"
|
||||
|
||||
" Zathura is a minimal PDF viewer with Vim bindings.
|
||||
let g:vimtex_view_method = 'zathura'
|
||||
|
||||
" }}
|
16
shell/bashrc
16
shell/bashrc
|
@ -48,6 +48,11 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
# =============================================================================
|
||||
# Common Environment Configuration
|
||||
# =============================================================================
|
||||
export EDITOR=vim
|
||||
|
||||
# =============================================================================
|
||||
# PATH
|
||||
# =============================================================================
|
||||
|
@ -55,6 +60,10 @@ if [ -d "$HOME/bin" ]; then
|
|||
export PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
if [ -d "$HOME/.local/bin" ]; then
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.cargo/env" ]; then
|
||||
source "$HOME/.cargo/env"
|
||||
fi
|
||||
|
@ -120,3 +129,10 @@ else
|
|||
echo "[warn] Neovim is not setup! Using the system vim" >> $log_file
|
||||
fi
|
||||
fi
|
||||
|
||||
# =============================================================================
|
||||
# Scala/SBT Setup
|
||||
# =============================================================================
|
||||
if command -v sbt > /dev/null 2>&1; then
|
||||
export SBT_OPTS="-XX:+UseG1GC -Xmx2048m"
|
||||
fi
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
*.font: xft:Iosevka Term:style=Regular:size=13
|
||||
*.boldFont: xft:Iosevka Term:style=Bold:size=13
|
||||
*.italicFont: xft:Iosevka Term:style=Italic:size=13
|
||||
*.boldItalicFont: xft:Iosevka Term:style=Bold Italic:size=13
|
||||
*.font: xft:Iosevka Nerd Font Mono:style=Regular:size=13
|
||||
*.boldFont: xft:Iosevka Nerd Font Mono:style=Bold:size=13
|
||||
*.italicFont: xft:Iosevka Nerd Font Mono:style=Italic:size=13
|
||||
*.boldItalicFont: xft:Iosevka Nerd Font Mono:style=Bold Italic:size=13
|
||||
|
||||
! Colors
|
||||
! hard contrast: *background: #1d2021
|
||||
|
|
Loading…
Add table
Reference in a new issue