Compare commits
No commits in common. "d7f13ff8655fcf6fde2d567f893c85ae2c4281ae" and "e3a77a5ac0060491d3bef6fca2f54928198e0027" have entirely different histories.
d7f13ff865
...
e3a77a5ac0
@ -1,20 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Profile that enables/disables certain features based on the device
|
|
||||||
# Everything might need to be restarted for this to take effect.
|
|
||||||
|
|
||||||
## ----------
|
|
||||||
## IMPORTANT!
|
|
||||||
## ----------
|
|
||||||
## Copy this to '~/.config/dot_profile'.
|
|
||||||
|
|
||||||
# Profiles
|
|
||||||
# --------
|
|
||||||
# DEFAULT:
|
|
||||||
# Everything's enabled. Nvim auto-installs plugins on launch.
|
|
||||||
# SLIM:
|
|
||||||
# Try to reduce bloat; turn off expensive plugins and eye-candy.
|
|
||||||
# Run :PlugInstall in Nvim to install plugins.
|
|
||||||
# MINIMAL:
|
|
||||||
# Nothing is launched automatically, and no plugins are installed.
|
|
||||||
|
|
||||||
export SYSTEM_PROFILE="DEFAULT"
|
|
@ -17,19 +17,17 @@ set -gx MANPATH "$MANPATH:/home/dogeystamp/.cache/cppman/"
|
|||||||
set fish_greeting ""
|
set fish_greeting ""
|
||||||
|
|
||||||
if status --is-interactive
|
if status --is-interactive
|
||||||
|
source ~/.config/fish/functions/prompts.fish
|
||||||
|
source ~/.config/fish/functions/extra_prompt.fish
|
||||||
|
|
||||||
# Enable Vi bindings
|
# Enable Vi bindings
|
||||||
fish_hybrid_key_bindings
|
fish_hybrid_key_bindings
|
||||||
|
|
||||||
source ~/.config/fish/functions/prompts.fish
|
|
||||||
|
|
||||||
set __fish_git_prompt_showdirtystate 1
|
set __fish_git_prompt_showdirtystate 1
|
||||||
set __fish_git_prompt_showupstream auto
|
set __fish_git_prompt_showupstream auto
|
||||||
|
|
||||||
set fish_color_param normal
|
set fish_color_param normal
|
||||||
set fish_color_cwd grey
|
set fish_color_cwd grey
|
||||||
|
|
||||||
if test $SYSTEM_PROFILE = "DEFAULT"
|
rem.sh show
|
||||||
source ~/.config/fish/functions/extra_prompt.fish
|
|
||||||
rem.sh show
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
function fish_right_prompt
|
function fish_right_prompt
|
||||||
if test $SYSTEM_PROFILE != "DEFAULT"
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
set -l usercolor (set_color $fish_color_cwd)
|
set -l usercolor (set_color $fish_color_cwd)
|
||||||
if command -sq cksum
|
if command -sq cksum
|
||||||
# randomised color for user/hostname based on disco.fish
|
# randomised color for user/hostname based on disco.fish
|
||||||
|
@ -9,8 +9,6 @@ set shell=/bin/sh
|
|||||||
|
|
||||||
hi Search cterm=NONE ctermfg=white ctermbg=blue
|
hi Search cterm=NONE ctermfg=white ctermbg=blue
|
||||||
hi StatusLine ctermbg=NONE cterm=italic
|
hi StatusLine ctermbg=NONE cterm=italic
|
||||||
hi SignColumn ctermbg=NONE
|
|
||||||
|
|
||||||
|
|
||||||
autocmd InsertEnter * hi StatusLine cterm=bold
|
autocmd InsertEnter * hi StatusLine cterm=bold
|
||||||
autocmd InsertLeave * hi StatusLine cterm=italic
|
autocmd InsertLeave * hi StatusLine cterm=italic
|
||||||
@ -112,57 +110,47 @@ nnoremap <C-k> <C-w>W
|
|||||||
" exit all (akin to ZZ, ZQ)
|
" exit all (akin to ZZ, ZQ)
|
||||||
nnoremap <silent> ZF :qa<cr>
|
nnoremap <silent> ZF :qa<cr>
|
||||||
|
|
||||||
" copy URL under cursor to clipboard bind
|
|
||||||
:nnoremap <silent><leader>uu :let @+ = expand('<cfile>')<CR>
|
|
||||||
|
|
||||||
" Plugins
|
" Plugins
|
||||||
|
|
||||||
" Run PlugInstall if there are missing plugins
|
" Run PlugInstall if there are missing plugins
|
||||||
if $SYSTEM_PROFILE == "DEFAULT"
|
" (disabled because it's kind of intense for weak devices)
|
||||||
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
"autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||||
\| PlugInstall --sync | source $MYVIMRC
|
"\| PlugInstall --sync | source $MYVIMRC
|
||||||
\| endif
|
"\| endif
|
||||||
endif
|
|
||||||
|
|
||||||
" The rest will not be sourced if the system is on minimal settings.
|
|
||||||
if $SYSTEM_PROFILE == "MINIMAL"
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
call plug#begin()
|
call plug#begin()
|
||||||
|
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
if $SYSTEM_PROFILE == "DEFAULT"
|
Plug 'lervag/vimtex'
|
||||||
Plug 'lervag/vimtex'
|
let g:vimtex_view_method = 'zathura'
|
||||||
let g:vimtex_view_method = 'zathura'
|
let g:vimtex_compiler_method = 'latexmk'
|
||||||
let g:vimtex_compiler_method = 'latexmk'
|
set conceallevel=0
|
||||||
set conceallevel=0
|
let g:tex_conceal='abdmg'
|
||||||
let g:tex_conceal='abdmg'
|
let g:vimtex_view_forward_search_on_start=1
|
||||||
let g:vimtex_view_forward_search_on_start=1
|
let g:vimtex_compiler_latexmk = {
|
||||||
let g:vimtex_compiler_latexmk = {
|
\ 'build_dir' : $HOME.'/.cache/latexmk/',
|
||||||
\ 'build_dir' : $HOME.'/.cache/latexmk/',
|
\ 'callback' : 1,
|
||||||
\ 'callback' : 1,
|
\ 'continuous' : 1,
|
||||||
\ 'continuous' : 1,
|
\ 'executable' : 'latexmk',
|
||||||
\ 'executable' : 'latexmk',
|
\ 'hooks' : [],
|
||||||
\ 'hooks' : [],
|
\ 'options' : [
|
||||||
\ 'options' : [
|
\ '-verbose',
|
||||||
\ '-verbose',
|
\ '-file-line-error',
|
||||||
\ '-file-line-error',
|
\ '-synctex=1',
|
||||||
\ '-synctex=1',
|
\ '-interaction=nonstopmode',
|
||||||
\ '-interaction=nonstopmode',
|
\ ],
|
||||||
\ ],
|
\}
|
||||||
\}
|
|
||||||
|
|
||||||
" spellcheck
|
" spellcheck
|
||||||
au BufEnter *.tex set spell spelllang=en_ca
|
au BufEnter *.tex set spell spelllang=en_ca
|
||||||
|
|
||||||
" Autowrite in tex files
|
" Autowrite in tex files
|
||||||
" au TextChanged,TextChangedI *.tex silent write
|
" au TextChanged,TextChangedI *.tex silent write
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
if has('python3') && ($SYSTEM_PROFILE == "DEFAULT" || $SYSTEM_PROFILE == "SLIM")
|
if has('python3')
|
||||||
Plug 'SirVer/ultisnips'
|
Plug 'SirVer/ultisnips'
|
||||||
let g:UltiSnipsExpandTrigger="<c-m>"
|
let g:UltiSnipsExpandTrigger="<c-m>"
|
||||||
let g:UltiSnipsJumpForwardTrigger="<c-m>"
|
let g:UltiSnipsJumpForwardTrigger="<c-m>"
|
||||||
@ -170,29 +158,24 @@ if has('python3') && ($SYSTEM_PROFILE == "DEFAULT" || $SYSTEM_PROFILE == "SLIM")
|
|||||||
let g:UltiSnipsSnippetDirectories=[$HOME.'/.config/nvim/ultisnips/']
|
let g:UltiSnipsSnippetDirectories=[$HOME.'/.config/nvim/ultisnips/']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if $SYSTEM_PROFILE == "DEFAULT"
|
Plug 'nvim-treesitter/nvim-treesitter'
|
||||||
Plug 'neovim/nvim-lspconfig'
|
|
||||||
Plug 'nvim-lua/lsp-status.nvim'
|
|
||||||
|
|
||||||
Plug 'hrsh7th/nvim-cmp'
|
|
||||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
|
||||||
|
|
||||||
Plug 'stevearc/dressing.nvim'
|
|
||||||
|
|
||||||
Plug 'nvim-treesitter/nvim-treesitter'
|
|
||||||
" Code folding
|
|
||||||
set foldmethod=expr
|
|
||||||
set foldexpr=nvim_treesitter#foldexpr()
|
|
||||||
"autocmd BufEnter * normal zR
|
|
||||||
endif
|
|
||||||
|
|
||||||
Plug 'axieax/urlview.nvim'
|
Plug 'axieax/urlview.nvim'
|
||||||
|
|
||||||
Plug 'ggandor/leap.nvim'
|
Plug 'neovim/nvim-lspconfig'
|
||||||
|
Plug 'nvim-lua/completion-nvim'
|
||||||
|
Plug 'nvim-lua/lsp-status.nvim'
|
||||||
|
Plug 'stevearc/dressing.nvim'
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
if $SYSTEM_PROFILE == "DEFAULT"
|
" copy URL under cursor to clipboard bind
|
||||||
" see .config/nvim/lua/init.lua
|
:nnoremap <silent><leader>uu :let @+ = expand('<cfile>')<CR>
|
||||||
lua require('init')
|
|
||||||
endif
|
" see .config/nvim/lua/init.lua
|
||||||
|
lua require('init')
|
||||||
|
|
||||||
|
" Code folding
|
||||||
|
set foldmethod=expr
|
||||||
|
set foldexpr=nvim_treesitter#foldexpr()
|
||||||
|
"autocmd BufEnter * normal zR
|
||||||
|
@ -24,26 +24,28 @@ require("urlview").setup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
local on_attach = function(client, bufnr)
|
local nvim_lsp = require('lspconfig')
|
||||||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
|
||||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
|
||||||
-- Enable completion triggered by <c-x><c-o>
|
|
||||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
|
||||||
|
|
||||||
local opts = { noremap=true, silent=true }
|
local on_attach = function(client, bufnr)
|
||||||
buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
||||||
buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||||
buf_set_keymap('n', 'gK', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
-- Enable completion triggered by <c-x><c-o>
|
||||||
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
buf_set_keymap('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
|
||||||
buf_set_keymap('n', 'gt', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
local opts = { noremap=true, silent=true }
|
||||||
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||||
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||||
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
buf_set_keymap('n', 'gK', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||||
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||||
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
buf_set_keymap('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||||
buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
buf_set_keymap('n', 'gt', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||||
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.format()<CR>', opts)
|
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||||
|
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||||
|
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||||
|
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||||
|
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||||
|
buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||||
|
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.format()<CR>', opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- settings per server (overrides defaults)
|
-- settings per server (overrides defaults)
|
||||||
@ -66,8 +68,6 @@ local servers = {
|
|||||||
},
|
},
|
||||||
clangd = {}
|
clangd = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
local nvim_lsp = require('lspconfig')
|
|
||||||
for lsp, sv_settings in pairs(servers) do
|
for lsp, sv_settings in pairs(servers) do
|
||||||
-- defaults
|
-- defaults
|
||||||
settings = {
|
settings = {
|
||||||
@ -86,33 +86,3 @@ require('dressing').setup({
|
|||||||
insert_only = false,
|
insert_only = false,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- fancy motions (leap.nvim)
|
|
||||||
vim.keymap.set({'n', 'x', 'o'}, 'f', '<Plug>(leap-forward-to)')
|
|
||||||
vim.keymap.set({'n', 'x', 'o'}, 'F', '<Plug>(leap-backward-to)')
|
|
||||||
require('leap').opts.safe_labels = {
|
|
||||||
"a", "s", "d", "f", "g", "h", "j", "k", "l"
|
|
||||||
}
|
|
||||||
require('leap').opts.labels = { "a", "s", "d",
|
|
||||||
"f", "k", "l", "h", "o", "d", "w", "e", "m", "b",
|
|
||||||
"u", "y", "v", "r", "g", "t", "c", "x", "/", "z",
|
|
||||||
}
|
|
||||||
|
|
||||||
local cmp = require'cmp'
|
|
||||||
cmp.setup({
|
|
||||||
window = {
|
|
||||||
completion = cmp.config.window.bordered(),
|
|
||||||
documentation = cmp.config.window.bordered(),
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
|
||||||
['<C-e>'] = cmp.mapping.abort(),
|
|
||||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
}),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
{ name = 'buffer' },
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
@ -61,11 +61,4 @@ if [ -r "$XDG_CONFIG_HOME"/identity ]; then
|
|||||||
source "$XDG_CONFIG_HOME"/identity
|
source "$XDG_CONFIG_HOME"/identity
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Profile to enable/disable features on certain devices
|
|
||||||
if [ ! -f "$XDG_CONFIG_HOME"/dot_profile ]; then
|
|
||||||
export SYSTEM_PROFILE="DEFAULT"
|
|
||||||
else
|
|
||||||
source "$XDG_CONFIG_HOME"/dot_profile
|
|
||||||
fi
|
|
||||||
|
|
||||||
source .config/bashrc
|
source .config/bashrc
|
||||||
|
10
src/.xinitrc
10
src/.xinitrc
@ -1,15 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
mon-on
|
mon-on
|
||||||
|
picom &
|
||||||
if [ $SYSTEM_PROFILE == "MINIMAL" ]; then
|
|
||||||
dwm
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $SYSTEM_PROFILE == "DEFAULT" ]; then
|
|
||||||
picom &
|
|
||||||
fi
|
|
||||||
xwallpaper --center .config/wall.png
|
xwallpaper --center .config/wall.png
|
||||||
# Host specific wallpapers
|
# Host specific wallpapers
|
||||||
wallpaper
|
wallpaper
|
||||||
|
Loading…
x
Reference in New Issue
Block a user