1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00

Compare commits

..

5 Commits

10 changed files with 99 additions and 84 deletions

View File

@ -71,11 +71,16 @@ A repository of my personal configuration files.
- [[https://github.com/GeorgeFilipkin/pulsemixer][pulsemixer]]
- [[https://www.python.org/][Python]]
- [[https://github.com/dylanaraps/pywal][pywal]]
- [[https://docs.haskellstack.org/en/stable/README/][stack]]
- [[https://github.com/Spotifyd/spotifyd][Spotifyd]]
- [[http://www.gnu.org/software/stow/][stow]]
- [[https://github.com/muennich/sxiv][sxiv]]
- [[https://github.com/tldr-pages/tldr][tldr]]
- [[https://github.com/sargon/trayer-srg][trayer-srg]]
- [[https://www.freedesktop.org/wiki/Software/udisks/][udisks]]
- [[https://xmobar.org/][xmobar]]
- [[https://hackage.haskell.org/package/xmonad-contrib][xmonad-contrib]]
- [[https://xmonad.org/][xmonad]]
- [[https://github.com/stoeckmann/xwallpaper][xwallpaper]]
- [[https://pwmt.org/projects/zathura/][zathura]]
** Fonts
@ -85,6 +90,7 @@ A repository of my personal configuration files.
** LSP Backends
- [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]]
- [[https://github.com/MaskRay/ccls][ccls]]
- [[https://github.com/haskell/haskell-ide-engine][haskell-ide-engine]]
- [[https://github.com/felixfbecker/php-language-server][php-language-server]]
- [[https://github.com/Microsoft/python-language-server][python-language-server]]
- [[https://github.com/theia-ide/typescript-language-server][typescript-language-server]]
@ -141,38 +147,29 @@ A repository of my personal configuration files.
** Plugins
*** General
- [[https://github.com/bling/vim-bufferline][bling/vim-bufferline]]
- [[easymotion/vim-easymotion]]
- [[https://github.com/ctrlpvim/ctrlp.vim][ctrlp/ctrlp.vim]]
- [[https://github.com/farmergreg/vim-lastplace][farmergreg/vim-lastplace]]
- [[https://github.com/jiangmiao/auto-pairs][jiangmiao/auto-pairs]]
- [[https://github.com/kien/ctrlp.vim][kien/ctrlp.vim]]
-[[https://github.com/junegunn/fzf][ junegunn/fzf]]
- [[https://github.com/justinmk/vim-sneak][justinmk/vim-sneak]]
- [[https://github.com/mbbill/undotree][mbbill/undotree]]
- [[https://github.com/mhinz/vim-signify][mhinz/vim-signify]]
- [[https://github.com/myusuf3/numbers.vim][myusuf3/numbers.vim]]
- [[https://github.com/nathanaelkane/vim-indent-guides][nathanaelkane/vim-indent-guides]]
- [[https://github.com/preservim/nerdtree][preservim/nerdtree]]
- [[https://github.com/rhysd/conflict-marker.vim][rhysd/conflict-marker.vim]]
- [[https://github.com/terryma/vim-multiple-cursors][terryma/vim-multiple-cursors]]
- [[https://github.com/tpope/vim-abolish][tpope/vim-abolish]]
- [[https://github.com/tpope/vim-surround][tpope/vim-surround]]
- [[https://github.com/vim-airline/vim-airline][vim-airline/vim-airline]]
**** Navigation
- [[https://github.com/unblevable/quick-scope][unblevable/quick-scope]]
*** Programming
- [[https://github.com/airblade/vim-gitgutter][airblade/vim-gitgutter]]
- [[https://github.com/autozimu/LanguageClient-neovim][autozimu/LanguageClient-neovim]]
- [[https://github.com/godlygeek/tabular][godlygeek/tabular]]
- [[https://github.com/neoclide/coc.nvim][neoclice/coc.nvim]]
- [[https://github.com/preservim/nerdcommenter][preservim/nerdcommenter]]
- [[https://github.com/RRethy/vim-hexokinase][RRethy/vim-hexokinase]]
- [[https://github.com/Shougo/deoplete.nvim][Shougo/deoplete.nvim]]
- [[https://github.com/sheerun/vim-polyglot][sheerun/vim-polyglot]]
- [[https://github.com/tpope/vim-fugitive][tpope/vim-fugitive]]
- [[https://github.com/Xuyuanp/nerdtree-git-plugin][Xuyuanp/nerdtree-git-plugin]]
**** Syntax Highlighting
- [[https://github.com/HerringtonDarkholme/yats.vim][HerringtonDarkholme/yats.vim]]
- [[https://github.com/MaxMEllon/vim-jsx-pretty][maxmellon/vim-jsx-pretty]]
- [[https://github.com/vim-pandoc/vim-pandoc-syntax][vim-pandoc/vim-pandoc-syntax]]
- [[https://github.com/yuezk/vim-js][yuezk/vim-js]]
**** Tags
- [[https://github.com/majutsushi/tagbar][majutsushi/tagbar]]
-[[https://github.com/Yggdroot/indentLine][ Yggdroot/indentLine]]
*** UI
- [[https://github.com/morhetz/gruvbox][morhetz/gruvbox]]
- [[https://github.com/ryanoasis/vim-devicons][ryanoasis/vim-devicons]]

View File

@ -23,6 +23,10 @@
- [[#elfeed-goodies][elfeed-goodies]]
- [[#spelling][Spelling]]
- [[#set-dictionaries-for-languages-i-use][Set dictionaries for languages I use]]
- [[#markdown][Markdown]]
- [[#open-mdx-files-in-markdown-mode][Open mdx files in markdown-mode]]
- [[#haskell][Haskell]]
- [[#auto-format-haskell-code-on-save][Auto format Haskell code on save]]
* General settings
** Variable font sizes depending on screen width. Set font to [[https://www.jetbrains.com/lp/mono/][JetBrains Mono]]
@ -239,3 +243,14 @@
(ispell-hunspell-add-multi-dic "en_GB,nl_NL,en_US")
(setq ispell-dictionary "en_GB,nl_NL,en_US"))
#+END_SRC
* Markdown
** Open mdx files in markdown-mode
#+BEGIN_SRC emacs-lisp
(add-to-list 'auto-mode-alist '("\\.mdx\\'" . markdown-mode))
#+END_SRC
* Haskell
** Auto format Haskell code on save
#+BEGIN_SRC emacs-lisp
(custom-set-variables
'(haskell-stylish-on-save t))
#+END_SRC

View File

@ -76,6 +76,8 @@
+lsp)
ledger ; an accounting system in Emacs
markdown ; writing docs for people to ignore
(haskell ; Haskell support
+ lsp)
(org ; organize your plain life in plain text
+roam
+dragndrop ; drag & drop files/images into org buffers

View File

@ -86,6 +86,9 @@ set -xg sudope_sequence \e\e
# Set tmux tmpdir to proper directory
set -xg TMUX_TMPDIR "$XDG_RUNTIME_DIR"
# Haskell
set -xg STACK_ROOT ~/.local/share/stack
# nvim alias
alias v="nvim"
alias sv="sudo nvim"
@ -94,9 +97,6 @@ alias sv="sudo nvim"
alias ls="exa"
alias l="exa -al"
# vifm alias
alias vifm="vifmrun"
# wget alias
alias wget='wget --hsts-file="~/.config/wget-hsts"'

15
install
View File

@ -1,10 +1,10 @@
#!/usr/bin/env fish
# Prerequisite & inistalled apps
set prerequisiteApps bat broot brave caffeine-ng exa fslint fzf go graphviz isync imagemagick lightdm-gtk-greeter mailcap deadd-notification-center-bin npm pamixer pfetch playerctl pulseaudio pulsemixer python pywal stow sxiv tldr udisks2 xwallpaper zathura
set prerequisiteApps bat broot brave caffeine-ng exa fslint fzf go graphviz isync imagemagick lightdm-gtk-greeter mailcap deadd-notification-center-bin npm pamixer pfetch playerctl pulseaudio pulsemixer python pywal stack stow sxiv tldr trayer udisks2 xwallpaper yarn zathura
set prerequisiteFonts otf-nerd-fonts-fira-code noto-fonts ttf-unifont
set prerequisiteLsp bash-language-server ccls php-language-server python-language-server typescript-language-server vscode-css-languageserver vscode-html-languageserver nodejs-intelephense
set configuredApps alacritty bspwm castero emacs firejail git gnupg gtk lf deadd-notification-center-bin mpd mpv mpv-mpris ncmpcpp neomutt neovim picom redshift spotifyd-dbus-mpris sxhkd tmux tuir weechat
set prerequisiteLsp bash-language-server ccls haskell-ide-engine php-language-server python-language-server typescript-language-server vscode-css-languageserver vscode-html-languageserver nodejs-intelephense
set configuredApps alacritty bspwm castero emacs firejail git gnupg gtk lf deadd-notification-center-bin mpd mpv mpv-mpris ncmpcpp neomutt neovim picom redshift spotifyd-dbus-mpris sxhkd tmux tuir weechat xmobar xmonad xmonad-contrib
set locales aspell-en hunspell-en_GB hunspell-en_US hunspell-nl
function mkdir_if_not_exist
@ -71,6 +71,12 @@ mkdir_if_not_exist ~/.config/weechat
mkdir_if_not_exist ~/.config/X11
mkdir_if_not_exist ~/.gnupg
mkdir_if_not_exist ~/.config/mpv/scripts
mkdir_if_not_exist ~/.config/coc/extensions
# Create xmonad directories
mkdir_if_not_exist ~/.config/xmonad
mkdir_if_not_exist ~/.cache/xmonad
mkdir_if_not_exist ~/.local/share/xmonad
# Link mpv plugins if they don't exist
if [ ! -h ~/.config/mpv/scripts/mpris.so ]
@ -118,6 +124,9 @@ end
# Install Neovim plugins
nvim +PlugInstall +qall
# Install Neovim coc extensions
yarn --cwd ~/.config/coc/extensions install
# Install npm packages
install_npm_package_if_not_exist lighthouse

View File

@ -0,0 +1,14 @@
{
"dependencies": {
"coc-css": ">=1.2.3",
"coc-eslint": ">=1.2.7",
"coc-html": ">=1.2.4",
"coc-jest": ">=1.0.3",
"coc-json": ">=1.2.6",
"coc-pairs": ">=1.2.21",
"coc-prettier": ">=1.1.14",
"coc-python": ">=1.2.12",
"coc-tsserver": ">=1.5.1",
"coc-yaml": ">=1.0.4"
}
}

View File

@ -0,0 +1,3 @@
{
"coc.preferences.formatOnSaveFiletypes": ["css", "markdown", "javascript", "javascriptreact", "typescript", "typescriptreact", "json", "yaml", "html", "graphql", "mdx"],
}

View File

@ -17,15 +17,13 @@
Plug 'unblevable/quick-scope'
" }
Plug 'bling/vim-bufferline'
Plug 'easymotion/vim-easymotion'
Plug 'farmergreg/vim-lastplace'
Plug 'jiangmiao/auto-pairs'
Plug 'junegunn/fzf'
Plug 'justinmk/vim-sneak'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'mbbill/undotree'
Plug 'mhinz/vim-signify'
Plug 'myusuf3/numbers.vim'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'preservim/nerdtree'
Plug 'rhysd/conflict-marker.vim'
Plug 'terryma/vim-multiple-cursors'
@ -35,30 +33,15 @@
" }
" Programming {
" Syntax Highlighting {
Plug 'HerringtonDarkholme/yats.vim'
Plug 'maxmellon/vim-jsx-pretty'
Plug 'vim-pandoc/vim-pandoc-syntax'
Plug 'yuezk/vim-js'
Plug 'Yggdroot/indentLine'
" }
" Tags {
Plug 'alvan/vim-closetag'
if executable('ctags')
Plug 'majutsushi/tagbar'
endif
" }
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
Plug 'airblade/vim-gitgutter'
Plug 'godlygeek/tabular'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'preservim/nerdcommenter'
Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' }
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'sheerun/vim-polyglot'
Plug 'tpope/vim-fugitive'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'Yggdroot/indentLine'
" }
" UI {
@ -127,9 +110,14 @@
vnoremap > >gv
" LanguageClient-neovim
nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR>
nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
map <Leader>lk :call LanguageClient#textDocument_hover()<CR>
map <Leader>lg :call LanguageClient#textDocument_definition()<CR>
map <Leader>lr :call LanguageClient#textDocument_rename()<CR>
map <Leader>lf :call LanguageClient#textDocument_formatting()<CR>
map <Leader>lb :call LanguageClient#textDocument_references()<CR>
map <Leader>la :call LanguageClient#textDocument_codeAction()<CR>
map <Leader>ls :call LanguageClient#textDocument_documentSymbol()<CR>
" For when you forget to sudo.. Really Write the file.
cmap w!! w !sudo tee % >/dev/null
@ -156,13 +144,6 @@
map <C-e> :NERDTreeToggle<CR>
" }
" Tagbar {
if executable('ctags')
" Tagbar panel
map <Leader>tt :TagbarToggle<CR>
endif
" }
" NerdCommenter {
" Add spaces after comment delimiters by default
let g:NERDSpaceDelims = 1
@ -173,36 +154,30 @@
let g:airline_powerline_fonts=1
" }
" Deoplete {
" Load deoplete on startup
let g:deoplete#enable_at_startup = 1
" }
" LanguageClient-neovim {
" Required for operations modifying multiple buffers like rename.
set hidden
" Needed for tsx files to work with typescript-language-server
" https://github.com/theia-ide/typescript-language-server/issues/90
autocmd BufNewFile,BufRead *.tsx setlocal filetype=typescript.tsx.
let g:LanguageClient_serverCommands = {
\ 'c': ['/usr/bin/ccls'],
\ 'javascript': ['/usr/bin/typescript-language-server', '--stdio'],
\ 'javascript.tsx': ['/usr/bin/typescript-language-server', '--stdio'],
\ 'typescript': ['/usr/bin/typescript-language-server', '--stdio'],
\ 'typescript.tsx': ['/usr/bin/typescript-language-server', '-gg/-stdio'],
\ 'php': ['/usr/bin/php-language-server'],
\ 'python': ['/usr/bin/pyls'],
\ 'sh': ['/usr/bin/bash-language-server'],
\ 'css': ['/usr/bin/css-languageserver', '--stdio'],
\ 'scss': ['/usr/bin/css-languageserver', '--stdio'],
\ 'sass': ['/usr/bin/css-languageserver', '--stdio'],
\ 'html': ['/usr/bin/html-languageserver', '--stdio']
\ }
" }
" hexokinase {
set termguicolors
" }
" haskell {
autocmd BufWrite *.hs :%!stylish-haskell
" }
" coc {
command! -nargs=0 Prettier :CocCommand prettier.formatFile
vmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
" Run jest for current project
command! -nargs=0 Jest :call CocAction('runCommand', 'jest.projectTest')
" Run jest for current file
command! -nargs=0 JestCurrent :call CocAction('runCommand', 'jest.fileTest', ['%'])
" Run jest for current test
nnoremap <leader>te :call CocAction('runCommand', 'jest.singleTest')<CR>
" Init jest in current cwd, require global jest command exists
command! JestInit :call CocAction('runCommand', 'jest.init')
" }
" }

View File

@ -51,6 +51,9 @@ export XINITRC=~/.config/X11/xinitrc
# This needs to be set for bspwm to see config
export XDG_CONFIG_HOME="$HOME/.config"
# Haskell
export STACK_ROOT=~/.local/share/stack
# Enable icons in lf
export LF_ICONS="\
tw=:\

View File

@ -53,9 +53,6 @@ alias sv="sudo nvim"
alias ls="exa"
alias l="exa -al"
# vifm alias
alias vifm="vifmrun"
# wget alias
alias wget='wget --hsts-file="~/.config/wget-hsts"'