direnv and neovim updates

This commit is contained in:
Noah Masur 2021-07-06 22:18:30 -04:00
parent 245dc6212e
commit 3a27c37f3e
4 changed files with 49 additions and 46 deletions

View File

@ -36,6 +36,11 @@ if status --is-interactive
set -g FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND" set -g FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
set -g FZF_DEFAULT_OPTS '-m --height 50% --border' set -g FZF_DEFAULT_OPTS '-m --height 50% --border'
source $DOTS/fish.configlink/conf.d/nix-env.fish
# Use `starship` prompt # Use `starship` prompt
starship init fish | source starship init fish | source
# Hook into direnv
direnv hook fish | source
end end

View File

@ -47,7 +47,7 @@ function abbrs --description 'All abbreviations'
# GitHub # GitHub
abbr -a ghr 'gh repo view -w' abbr -a ghr 'gh repo view -w'
abbr -a gha 'gh run list | head -1 | awk \'{ print $NF }\' | xargs gh run view' abbr -a gha 'gh run list | head -1 | awk \'{ print $(NF-2) }\' | xargs gh run view'
abbr -a grw 'gh run watch' abbr -a grw 'gh run watch'
abbr -a grf 'gh run view --log-failed' abbr -a grf 'gh run view --log-failed'
abbr -a grl 'gh run view --log' abbr -a grl 'gh run view --log'
@ -67,6 +67,7 @@ function abbrs --description 'All abbreviations'
# Notes # Notes
abbr -a qn 'quicknote' abbr -a qn 'quicknote'
abbr -a sn 'syncnotes' abbr -a sn 'syncnotes'
abbr -a to 'today'
abbr -a work 'vim $NOTES_PATH/work.md' abbr -a work 'vim $NOTES_PATH/work.md'
# Improved CLI Tools # Improved CLI Tools

View File

@ -4,6 +4,7 @@ function fish_user_key_bindings
bind -M insert \co 'edit' bind -M insert \co 'edit'
bind -M insert \ce 'recent' bind -M insert \ce 'recent'
bind -M insert \cg 'commandline-git-commits' bind -M insert \cg 'commandline-git-commits'
bind -M insert \cf 'fcd'
bind -M insert \x1F accept-autosuggestion bind -M insert \x1F accept-autosuggestion
bind -M default \x1F accept-autosuggestion bind -M default \x1F accept-autosuggestion
end end

View File

@ -10,52 +10,60 @@ end
-- Packer plugin installations -- Packer plugin installations
local use = require('packer').use local use = require('packer').use
require('packer').startup(function() require('packer').startup(function()
use 'wbthomason/packer.nvim' -- Maintain plugin manager use 'wbthomason/packer.nvim' -- Maintain plugin manager
use 'tpope/vim-eunuch' -- File manipulation in Vim use 'tpope/vim-eunuch' -- File manipulation in Vim
use 'tpope/vim-vinegar' -- Fixes netrw file explorer use 'tpope/vim-vinegar' -- Fixes netrw file explorer
use 'tpope/vim-fugitive' -- Git commands use 'tpope/vim-fugitive' -- Git commands
use 'tpope/vim-surround' -- Manipulate parentheses use 'tpope/vim-surround' -- Manipulate parentheses
use 'tpope/vim-commentary' -- Use gc or gcc to add comments use 'tpope/vim-commentary' -- Use gc or gcc to add comments
use 'tpope/vim-repeat' -- Actually repeat using . use 'tpope/vim-repeat' -- Actually repeat using .
use 'christoomey/vim-tmux-navigator' -- Hotkeys for tmux panes use 'christoomey/vim-tmux-navigator' -- Hotkeys for tmux panes
use 'morhetz/gruvbox' -- Colorscheme use 'morhetz/gruvbox' -- Colorscheme
use 'phaazon/hop.nvim' -- Quick jump around the buffer use 'phaazon/hop.nvim' -- Quick jump around the buffer
use 'neovim/nvim-lspconfig' -- Language server linting use 'neovim/nvim-lspconfig' -- Language server linting
use 'folke/lsp-colors.nvim' -- Pretty LSP highlights use 'folke/lsp-colors.nvim' -- Pretty LSP highlights
use 'jiangmiao/auto-pairs' -- Parentheses
use 'rafamadriz/friendly-snippets' use 'rafamadriz/friendly-snippets'
use 'hrsh7th/vim-vsnip' use 'hrsh7th/vim-vsnip'
use 'hrsh7th/vim-vsnip-integ' use 'hrsh7th/vim-vsnip-integ'
use 'hrsh7th/nvim-compe' -- Auto-complete use 'hrsh7th/nvim-compe' -- Auto-complete
use 'godlygeek/tabular' -- Spacing and alignment use 'godlygeek/tabular' -- Spacing and alignment
use 'vimwiki/vimwiki' -- Wiki Markdown System use 'vimwiki/vimwiki' -- Wiki Markdown System
use 'airblade/vim-rooter' -- Change directory to git route use 'airblade/vim-rooter' -- Change directory to git route
use 'itchyny/lightline.vim' -- Status bar use { -- Status bar
use { -- Syntax highlighting for most languages 'hoob3rt/lualine.nvim',
requires = {
'kyazdani42/nvim-web-devicons',
opt = true
}
}
use { -- Syntax highlighting for most languages
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate' run = ':TSUpdate'
} }
use 'bfontaine/Brewfile.vim' -- Brewfile syntax use 'bfontaine/Brewfile.vim' -- Brewfile syntax
use 'blankname/vim-fish' -- Fish syntax use 'blankname/vim-fish' -- Fish syntax
use 'chr4/nginx.vim' -- Nginx syntax use 'chr4/nginx.vim' -- Nginx syntax
use 'hashivim/vim-terraform' -- Terraform syntax use 'hashivim/vim-terraform' -- Terraform syntax
use 'cespare/vim-toml' -- TOML syntax use 'cespare/vim-toml' -- TOML syntax
use 'towolf/vim-helm' -- Helm syntax use 'towolf/vim-helm' -- Helm syntax
use { -- Git next to line numbers use 'LnL7/vim-nix' -- Nix syntax
use { -- Git next to line numbers
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
requires = {'nvim-lua/plenary.nvim'}, requires = {'nvim-lua/plenary.nvim'},
config = function() config = function()
require('gitsigns').setup() require('gitsigns').setup()
end end
} }
use { -- Fuzzy finder use { -- Fuzzy finder
'junegunn/fzf.vim', 'junegunn/fzf.vim',
requires = {'/usr/local/opt/fzf'} requires = {'/usr/local/opt/fzf'}
} }
-- use 'ludovicchabant/vim-gutentags' -- use 'ludovicchabant/vim-gutentags'
end) end)
-- LSP Plugins -- LSP Settings
-- ============
require('lspconfig').rust_analyzer.setup{} require('lspconfig').rust_analyzer.setup{}
require('lspconfig').pyright.setup{ require('lspconfig').pyright.setup{
cmd = { "poetry", "run", "pyright-langserver", "--stdio" } cmd = { "poetry", "run", "pyright-langserver", "--stdio" }
@ -279,22 +287,10 @@ vim.api.nvim_exec([[
command! AddTag call fzf#run({'source': 'rg "#[A-Za-z/]+[ |\$]" -o --no-filename --no-line-number | sort | uniq', 'sink': function('PInsert')}) command! AddTag call fzf#run({'source': 'rg "#[A-Za-z/]+[ |\$]" -o --no-filename --no-line-number | sort | uniq', 'sink': function('PInsert')})
]], false) ]], false)
-- Lightline status bar -- Status bar
vim.g.lightline = { require('lualine').setup({
["colorscheme"] = "jellybeans", options = { theme = 'gruvbox' }
["active"] = { })
["right"] = {
{ "lineinfo" }
},
["left"] = {
{ "mode", "paste" },
{ "readonly", "relativepath", "gitbranch", "modified" }
}
},
["component_function"] = {
["gitbranch"] = "fugitive#head"
},
}
-- Remap space as leader key -- Remap space as leader key
vim.api.nvim_set_keymap("", "<Space>", "<Nop>", {noremap=true, silent=true}) vim.api.nvim_set_keymap("", "<Space>", "<Nop>", {noremap=true, silent=true})