Skip to content

Commit

Permalink
Deploying to template from @ 8240f20 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
dmadisetti committed May 13, 2024
1 parent ef5ffea commit 469bb04
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 25 deletions.
33 changes: 28 additions & 5 deletions dot/vim/custom.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,35 @@ augroup autoformat_settings
augroup END
autocmd FileType cuda let b:codefmt_formatter = 'clang-format'

" Nerdtree / Airlatex sidebar
let g:NetrwIsOpen=0

function! ToggleNetrw()
if g:NetrwIsOpen
let i = bufnr("$")
while (i >= 1)
if (getbufvar(i, "&filetype") == "oil")
silent exe "bwipeout " . i
endif
let i-=1
endwhile
let g:NetrwIsOpen=0
else
let g:NetrwIsOpen=1
" Doesn't exist? Open it
" Calculate 32% of the width of the window
let width = float2nr(winwidth(0) * 0.16)
" Open a vertical split and resize it
execute 'vsplit | vertical resize' width '| Oil'
endif
endfunction

" Played with a few things, but typically, I just use ctrl-P
" So better to have a useful utility than a file navigator.
function! ToggleAirLatexOrNERDTree()
if exists("g:AirLatexIsActive") && g:AirLatexIsActive
call AirLatexToggle()
else
NERDTreeToggle
call ToggleNetrw()
endif
endfunction

Expand Down Expand Up @@ -40,8 +63,8 @@ endfun
" Such peace, much wow
function! Zen()
:Goyo
:SoftPencil
if g:MarkDowned
:SoftPencil
:highlight CursorLineNR ctermbg=236 ctermfg=240
:highlight Hidden ctermbg=234 ctermfg=234
:highlight LineNum ctermbg=234 ctermfg=238
Expand All @@ -59,8 +82,8 @@ function! Zen()
nnoremap <space>p :call AirLatex_PrevCommentPosition()<CR>
nnoremap <left> :call AirLatex_PrevCommentPosition()<CR>
nnoremap <right> :call AirLatex_NextCommentPosition()<CR>
nnoremap <S-left> :call AirLatex_PrevChangePosition()<CR>
nnoremap <S-right> :call AirLatex_NextChangePosition()<CR>
nnoremap <S-up> :call AirLatex_PrevChangePosition()<CR>
nnoremap <S-down> :call AirLatex_NextChangePosition()<CR>
iunmap jk
iunmap kj
Expand Down
30 changes: 17 additions & 13 deletions dot/vim/plugins.vim
Original file line number Diff line number Diff line change
Expand Up @@ -21,38 +21,38 @@ Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'edkolev/tmuxline.vim'

" Background
Plug 'skywind3000/asyncrun.vim'

" Bad habits
Plug 'ctrlpvim/ctrlp.vim'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'stevearc/oil.nvim', { 'on': 'Oil' }

" Productivity
Plug 'terryma/vim-multiple-cursors'
Plug 'SirVer/ultisnips', { 'for': ['tex', 'markdown', 'snippets'] }

" Markdown
Plug 'gabrielelana/vim-markdown', { 'for': ['tex', 'markdown'] }
" Plug 'lervag/vimtex', { 'for': ['tex'] }
Plug 'KeitaNakamura/tex-conceal.vim', { 'for': ['tex', 'markdown'] }
Plug 'preservim/vim-pencil', { 'for': ['tex', 'markdown'] }
" , { 'for': ['tex', 'markdown'] } " nav break lines
Plug 'preservim/vim-pencil'
Plug 'rhysd/vim-grammarous', { 'for': ['tex', 'markdown'] }
Plug 'AnotherGroupChat/citation.vim', { 'for': ['tex', 'markdown'], 'branch': 'denite'}
Plug 'Shougo/denite.nvim', { 'do': ':UpdateRemotePlugins', 'for': ['markdown', 'tex'] }
Plug 'dmadisetti/paragraph-number.vim', { 'do': ':UpdateRemotePlugins' }
Plug 'lervag/vimtex'

" Zen
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' }
Plug 'junegunn/limelight.vim', { 'on': 'Goyo' }

" I think I might be in love with @junegunn
" View registers before usage
" TODO: Replace with which-key :(
Plug 'junegunn/vim-peekaboo'

" More extension to base nix
Plug 'rhysd/clever-f.vim'


" Overleaf in vim!
" Plug 'da-h/AirLatex.vim'
" replaced with 'dmadisetti/AirLatex.vim' and launch through nix.
Expand All @@ -64,20 +64,17 @@ Plug 'dense-analysis/ale', { 'for' : 'cpp' }
" Rhai
Plug 'kuon/rhai.vim', { 'for': 'rhai', 'branch': 'main'}

" Background
Plug 'skywind3000/asyncrun.vim'

" Git!
" Plug 'tpope/vim-fugitive'

" Nix'ed
Plug 'LnL7/vim-nix', { 'for': 'nix' }

" Elixir
Plug 'elixir-editors/vim-elixir', { 'for': 'elixir' }

" Jupyter / Python
Plug 'szymonmaszke/vimpyter', { 'for': 'ipynb' }
" Plug 'numirias/semshi', { 'do': ':UpdateRemotePlugins', 'for': 'python' }
Plug 'vim-python/python-syntax' ", { 'do': ':UpdateRemotePlugins', 'for': 'python' }
let g:python_highlight_all = 1

" Edit binary data in hex
Plug 'fidian/hexmode'
Expand All @@ -91,16 +88,20 @@ Plug 'dag/vim-fish', {'for': 'fish'}

" Why no %
" Plug 'chrisbra/matchit' ", {'for': ['fish', 'bash', 'shell', 'zsh']}
" Too slow

" Sure, why not
" Plug 'neoclide/coc.nvim', {'branch': 'release'}

" All hail our AI overlord
if has('nvim-0.6')
Plug 'github/copilot.vim', {'branch': 'release'}
Plug 'nvim-lua/plenary.nvim'
Plug 'github/copilot.vim', {'branch': 'release'}
Plug 'CopilotC-Nvim/CopilotChat.nvim', { 'branch': 'canary' }
endif

" Maktaba + Glaive for code formatting
" TODO: LSP and tree sitters all the way?
Plug 'google/vim-maktaba'
Plug 'google/vim-codefmt'
Plug 'google/vim-glaive'
Expand All @@ -109,3 +110,6 @@ Plug 'lpenz/vim-codefmt-haskell', { 'for': 'haskell' }
" All of your Plugins must be added before the following line
call plug#end() " required
call glaive#Install()

luafile ~/.dots/dot/vim/plugins/nvim-tree.lua
luafile ~/.dots/dot/vim/plugins/copilot.lua
9 changes: 9 additions & 0 deletions dot/vim/plugins/nvim-tree.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- disable netrw at the very start of your init.lua
-- vim.g.loaded_netrw = 1
-- vim.g.loaded_netrwPlugin = 1

-- optionally enable 24-bit colour
-- vim.opt.termguicolors = true

-- empty setup using defaults
require("oil").setup()
12 changes: 11 additions & 1 deletion dot/vim/settings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ let g:tex_flavor = 'lualatex'
set conceallevel=2
let g:tex_conceal="abdgm"
let g:pencil#conceallevel = 0
let g:pencil#wrapModeDefault = 'soft' " default is 'hard'

" Ultisnips
let g:UltiSnipsExpandTrigger="<c-u>"
Expand All @@ -50,7 +51,8 @@ let g:citation_vim_cache_path="~/.vim/citation.cache"

" Air Latex
let g:AirLatexCookieDB="~/.mozilla/firefox/*.default/cookies.sqlite"
let g:AirLatexLogLevel="DEBUG"
let g:AirLatexUseDropbox = 1
" let g:AirLatexLogLevel="DEBUG"

" Linters
let g:ale_sign_column_always = 1
Expand All @@ -62,6 +64,11 @@ let g:do_auto_show_process_window = 0
let g:spell_checking = 0
let g:MarkDowned = 0

" Played around with trying to get this to work with tree sitters, but didn't
" like it.
let g:markdown_fenced_languages = ['python', 'javascript', 'bash=sh',
\ '{python}=python', '{.python.marimo}=python']

" General styling
set guifont=RobotoMono\ Nerd\ Font\ Medium:h15
set t_Co=256 " This is may or may not needed.
Expand All @@ -83,6 +90,9 @@ set softtabstop=2 " Sets the number of columns for a TAB
set expandtab " Expand TABs to spaces
set tw=80

" 'Fix' <C-a> to increment
set nrformats+=unsigned

" Persistent undo is great
set undofile
set undodir=~/.vim
Expand Down
7 changes: 1 addition & 6 deletions nix/spoof/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,7 @@
sellout = false;

# Hopefully this is normally empty.
insecure = [
# Annoying. See github.com/NixOS/nixpkgs#269713
# for resolution. Homeassistant problem so could restrict to lambda, but
# CI on github needs to pass.
"openssl-1.1.1w"
];
insecure = [ ];

# getty can be just as pretty as lightdm imho.
# example getty response
Expand Down

0 comments on commit 469bb04

Please sign in to comment.