Compare commits

..

212 Commits

Author SHA1 Message Date
Hoang Nguyen 0f2574a887
neovim + system
neovim:
    - highlight:
        + adjust treesitter groups for nord (TSField as fg doesn't look
          good in yaml files). Also add highlight for TSNote, TSWarning,
          TSDanger (notes such as 'TODO', 'FIXME', ...)
        + rewrite the way theme is set (now 'g:colors_name' is used
          properly instead of a hacky variable 'g:global_theme'). Also
          make setting theme more modular
        + add 'highlight_languages' groups for other syntaxes (html,
          markdown) that are not covered with treesitter
    - mappings: properly move ':Telescope lsp_range_code_action' to
      visual block + avoid mappings for <C-x> and <C-a> (number
      decrement/increment)
    - null-ls.nvim: add basic config, load before nvim-lspconfig
    - plugins: add nvim-treesitter/playground
    - feline.nvim: lazy loaded on VimEnter
    - nvim-lightbulb: only refresh on CursorHold (previously stopped
      working after entering INSERT mode)
system:
    - tlp: update config for v1.4.0
setup: add ani-cli to scripts.sh
2021-10-18 00:53:25 +07:00
Hoang Nguyen d8b8b179f5
neovim: update script to install sumneko_lua
--rebase might cause the update process to fail on submodules
2021-10-17 21:48:14 +07:00
Hoang Nguyen a74bba23c8
system: add resolvconf config 2021-10-17 21:48:14 +07:00
Hoang Nguyen c196180d0a
neovim: clean up
mappings: add doc for nvim-treesitter mappings
chore: unify the way mappings to a command is called
nvim-treesitter: load vim.opt for folding after setup()
nvim-lspconfig: emmet_ls is now officially supported upstream
2021-10-17 21:48:14 +07:00
Hoang Nguyen d09754811c
gallery-dl: update config to avoid filename collisions 2021-10-17 21:48:14 +07:00
Hoang Nguyen 61b5cb5b70
neovim: revamp
- packer: load vim-eft, nvim-spectre, nvim-dap, persistence.nvim on key
  press instead of on Vim event
- keybindings: redefine multiple, move keybindings for plugins loaded on
  key press to their configs
- plugins: add winshift.nvim, better-escape.nvim, window-picker.nvim,
  neogen, spellsitter.nvim, nvim-lightbulb, close-buffers.nvim
- init.lua: move autocmds back inside async loop (filetype events already
  got handled by filetype.nvim)
- zen-mode.nvim + twilight.nvim: move from 'tools' to 'editor' group
- lsp: change signs characters for unification
- dap: initial config, keybindings
- feline.nvim: reorder elements, add nvim-lightbulb signs
- chore: unify the way setup() is called, and format stuff
2021-10-17 21:48:14 +07:00
Hoang Nguyen a2a7caa279
neovim: bunch of changes again
- Fix commit 8a8e0db586 : vim.opt is a table, so it should have been
  vim.o -> vim.opt:get()
- Add filetype.nvim (improved startup time)
- Drop vimtex. Potentially will switch to tex.nvim
- Re-compile packer only inside '/modules' directory (less eager)
2021-10-17 21:48:14 +07:00
Hoang Nguyen ee9a615cfe
shells: drop z.lua, add fish completion for zoxide 2021-10-17 21:48:14 +07:00
Hoang Nguyen 5dcd5c16be
fzf: bind alt-j, alt-k to scroll preview window 2021-10-17 21:48:14 +07:00
Hoang Nguyen 7991b12511
neovim: make completion menu more colorful
Also change Telescope match highlight to be the same as nvim-cmp
2021-10-17 21:48:14 +07:00
Hoang Nguyen c9941850a2
neovim: breaking change in nvim-cmp config
nvim-cmp now uses floating window instead of pumsible.
See https://github.com/hrsh7th/nvim-cmp/issues/231
2021-10-17 21:48:14 +07:00
Hoang Nguyen 4508f2a819
neovim: replace nvim-lint + neoformat with null-ls.nvim
Also update config for jsonls and yamlls.
2021-10-17 21:48:14 +07:00
Hoang Nguyen 2248faa795
neovim: vim.o -> vim.opt 2021-10-17 21:48:13 +07:00
Hoang Nguyen 1f973f3850
neovim: add scripts to install lsp servers 2021-10-17 21:48:13 +07:00
Hoang Nguyen ef76692015
Various user configs
+ vifm: improve preview scripts
+ lite-xl: change fonts' locations
+ neovim: update config for nvim-tree.lua
2021-10-17 21:48:13 +07:00
Hoang Nguyen 68b4e1d59f
neovim: move autocmd out of async loop
setfiletype doesn't trigger when autocmd is lazy loaded
2021-10-17 21:48:13 +07:00
Hoang Nguyen 493e7d6c1c
Update user agent for various config 2021-10-17 21:48:13 +07:00
Hoang Nguyen 820929c2cb
neovim, emacs: manually configure sumneko_lua
Also neovim: disable options already set (see ':h nvim-defaults')
2021-10-17 21:48:13 +07:00
Hoang Nguyen 5b79df9f6f
scripts: fix syntax + use 0x0.st for url shortening 2021-10-17 21:48:13 +07:00
Hoang Nguyen 9b81f9b07b
Some user configs
- neovim:
    + update lspkind icons for completion
    + start migrating config for nvim-tree.lua
    + update lsp config for sumneko_lua
- scripts:
    + add POSIX clients for PurritoBin (https://bsd.ac)
    + add script to upload to https://0x0.st
2021-10-17 21:48:13 +07:00
Hoang Nguyen 12e151d3e1
Some system config changes
- startwl: move `chmod` out of if statement (ensure $XDG_RUNTIME_DIR
  properly has 0700 permission)
- doas: add Void specified config
- nftables: add note for future changes to block rules
- grub: disable submenu
2021-10-17 21:48:13 +07:00
Hoang Nguyen ea74e9076e
neovim: disable rarely used wilder.nvim + conjure 2021-10-17 21:48:13 +07:00
Hoang Nguyen dfcfbd004a
neovim: configure packer.nvim + add iswap.nvim 2021-10-17 21:48:12 +07:00
Hoang Nguyen a8e3fb728b
neovim: add a snippet for using pandoc 2021-10-17 21:48:12 +07:00
Hoang Nguyen 6f78887641
neovim: changes a bunch
- undodir: move to stdpath('data') to be more inline with other
- add todo-comments.nvim
- whichkey: rebind for hop.nvim (avoid conflicting with vim-sandwich
  blockwise)
- mappings: clean up and rearrange
2021-10-17 21:48:12 +07:00
Hoang Nguyen 8c725aa77c
Lots of changes. See comment :)
- firefox: add script to automate updating user.js
- Anime4K: update version in install script to 4.0.1
- neovim:
    + remove nnn plugin (telescope's file browser has hidden files now)
    + telescope.nvim: update horizontal layout
    + nvim-cmp: update config for lsp, add more sources
    + indent-blankline: update config to use setup()
    + toggleterm, bufferline: repos moved
    + plugins: update multiple small configurations
2021-10-17 21:48:12 +07:00
Hoang Nguyen 2e3a1b70a4
neovim: update highlights for nvim-tree 2021-10-17 21:48:12 +07:00
Hoang Nguyen 0b6f538235
Bunch of changes
- emacs: enable parinfer
- neovim:
    + add config for sniprun
    + replace lsp-rooter.nvim with project.nvim
    + replace galaxyline.nvim with feline.nvim
    + update config for gitsigns.nvim, nvimtree and alpha-nvim
2021-10-17 21:48:12 +07:00
Hoang Nguyen 22945505ed
neovim: update config for gitsigns.nvim 2021-10-17 21:48:12 +07:00
Hoang Nguyen fc2f231aaf
neovim: load persistence.nvim in BufEnter
This way it will still work in a readonly buffer (eg. alpha)
2021-10-17 21:48:12 +07:00
Hoang Nguyen b9d674767b
neovim: replace dashboard-nvim with alpha-nvim + persistence.nvim 2021-10-17 21:48:12 +07:00
Hoang Nguyen e9cdccb8a8
Another bunch of changes
emacs: update init.el following upstream
neovim: add conjure, update packer call for nvim-cmp
2021-10-17 21:48:12 +07:00
Hoang Nguyen 2a62792e2b
Bunch of changes
neovim: add more plugins
nushell, xonsh: update startup hook for starship
2021-10-17 21:48:11 +07:00
Hoang Nguyen 7889449676
neovim: move bufferline highlight to its setup{} 2021-10-17 21:48:11 +07:00
Hoang Nguyen a747daeacd
neovim: asynchronous loading in init.lua
Also fix luasnip mapping for nvim-cmp
2021-10-17 21:48:11 +07:00
Hoang Nguyen f6b969a931
river: update config 2021-10-17 21:48:11 +07:00
Hoang Nguyen fa5374bafe
neovim: reconfigure nvim-cmp mappings + vim.cmd -> vim.api.nvim_command
Also delete `news` script
2021-10-17 21:48:11 +07:00
Hoang Nguyen b45c8f2541
neovim: add editorconfig.vim and spectre.nvim 2021-10-17 21:48:11 +07:00
Hoang Nguyen 58598d112d
neovim: add asynctasks.vim 2021-10-17 21:48:11 +07:00
Hoang Nguyen ac38c5dcc9
neovim: support choice nodes for luasnip
Also turn on short keys for moving between windows
2021-10-17 21:48:11 +07:00
Hoang Nguyen af695b83db
neovim: add undotree and vim-eft
Also fix some cursor highlight groups
2021-10-17 21:48:11 +07:00
Hoang Nguyen 09cef9c60a
neovim: fix luasnip config
lazy_load() won't reload snippets when opening a new buffer, and will
only load general snippets (ft=all) first
2021-10-17 21:48:11 +07:00
Hoang Nguyen ac6be59e68
neovim: configure lsp_signature.nvim 2021-10-17 21:48:11 +07:00
Hoang Nguyen 78b6d2bf54
neovim: add nvim-lint, nvim-dap-ui, vimtex 2021-10-17 21:48:10 +07:00
Hoang Nguyen 3cefe864f4
neovim: big refractor
- nvim-compe -> nvim-cmp
- combine multple modules config into category files
- add some more plugins
2021-10-17 21:48:10 +07:00
Hoang Nguyen 418f3b462b
neovim: lspsaga highlight groups 2021-10-17 21:48:10 +07:00
Hoang Nguyen 7deb0d68f1
neovim: add more plugins 2021-10-17 21:48:10 +07:00
Hoang Nguyen c31868c416
README: mention deprecation of EXWM config 2021-10-17 21:48:10 +07:00
Hoang Nguyen e6e8689b57
Bunch of changes
- shells: set GOPROXY=direct (download sources directly instead of going
through proxy.golang.org)
- emacs: deprecated EXWM
- scripts: api_keys for `imdb` is not valid anymore, and I don't want to
subscribe for another key
2021-10-17 21:48:10 +07:00
Hoang Nguyen 5ecf79b424
neovim: remove deprecated config 2021-10-17 21:48:05 +07:00
Hoang Nguyen 7a33971f18
nftables: add wireguard rules template 2021-10-17 21:48:05 +07:00
Hoang Nguyen c4aa156dd1
river: change color format 2021-10-17 21:48:05 +07:00
Hoang Nguyen c2eee8ce71
river: put XKB env var in the config 2021-10-17 21:48:05 +07:00
Hoang Nguyen c933bc279c
river: update config 2021-10-17 21:48:05 +07:00
Hoang Nguyen b0d2122117
neovim: fix typo 2021-10-17 21:48:05 +07:00
Hoang Nguyen 7a4a5bdeb1
neovim: add translate-shell + orgmode 2021-10-17 21:48:05 +07:00
Hoang Nguyen 8b3da5fff0
starship: update config 2021-10-17 21:48:04 +07:00
Hoang Nguyen d3b5747f57
Some changes
river: remove opacity option
xonsh: add starship init
2021-10-17 21:48:04 +07:00
Hoang Nguyen 2501edc0ea
neovim: add zem-mode + symbol-outline 2021-10-17 21:48:04 +07:00
Hoang Nguyen be9665b0e6
neovim: add hop.nvim 2021-10-17 21:48:04 +07:00
Hoang Nguyen ab971ea6c7
neovim: update Nord for treesitter 2021-10-17 21:48:04 +07:00
Hoang Nguyen 024d62eca3
Add zellij themes 2021-10-17 21:48:04 +07:00
Hoang Nguyen 13b0482e0e
neovim: forgot to rebind lsp 2021-10-17 21:48:04 +07:00
Hoang Nguyen 84c528ddb1
neovim: add trouble.nvim
Also update treesitter highlight groups to be aligned with original
nord.vim
2021-10-17 21:48:04 +07:00
Hoang Nguyen ec3540565a
neovim: add lspkind and nnn.vim 2021-10-17 21:48:04 +07:00
Hoang Nguyen faaf42a125
neovim: fix bufferline TablineFill color
It was called twice.
2021-10-17 21:48:04 +07:00
Hoang Nguyen a0ca5c25b6
neovim: add Neogit config 2021-10-17 21:48:04 +07:00
Hoang Nguyen 26a8058564
neovim: nord highlight groups for lsp 2021-10-17 21:48:03 +07:00
Hoang Nguyen 584e77b933
shells: remove `extract` aliases
Use ~/.local/bin/extract instead
2021-10-17 21:48:03 +07:00
Hoang Nguyen 2dbf4079a5
neovim: minor improvement in lspconfig 2021-10-17 21:48:03 +07:00
Hoang Nguyen 5ab3184378
neovim: add lspconfig, move compe config 2021-10-17 21:48:03 +07:00
Hoang Nguyen e6e5b3149f
Update README 2021-10-17 21:48:03 +07:00
Hoang Nguyen bc7bdb2bdc
neovim: almost done 2021-10-17 21:48:03 +07:00
Hoang Nguyen d1be74ee0b
neovim: lazy-load some plugins
Also rebind mappings for GitSigns
2021-10-17 21:48:03 +07:00
Hoang Nguyen e1b2a23507
Bunch of changes
Credit https://git.sr.ht/~novakane/dotfiles
2021-10-17 21:48:03 +07:00
Hoang Nguyen 52b9be4bee
neovim: add indent-blankline, use which-key for mappings
Also add more nord highlight groups
2021-10-17 21:48:03 +07:00
Hoang Nguyen e03162b21a
neovim: add more config 2021-10-17 21:48:03 +07:00
Hoang Nguyen 0098bc351f
neovim: gitsigns, basic mappings and nord colors
Also update nushell startup hook
2021-10-17 21:48:02 +07:00
Hoang Nguyen c447ef8282
neovim: add bufferline and nvim-tree plugins 2021-10-17 21:48:02 +07:00
Hoang Nguyen 9e2fc5d4bd
emacs: add kokkoro.png splash image 2021-10-17 21:48:02 +07:00
Hoang Nguyen 04434a48d0
Remove gtk2 env, move theme to Matcha-dark-azul 2021-10-17 21:48:02 +07:00
Hoang Nguyen 736ea7fbbc
Comment out gtk-theme 2021-10-17 21:48:02 +07:00
Hoang Nguyen 474d27ec30
neovim: add galaxyline, ditch nord theme 2021-10-17 21:48:02 +07:00
Hoang Nguyen 64cc5e1f00
neovim: basic new config in lua 2021-10-17 21:48:02 +07:00
Hoang Nguyen b080c54e5b
Add glow config
Also deprecate neovim config.
2021-10-17 21:48:02 +07:00
Hoang Nguyen 3b6e1e931b
bash: remove shebang for sourced files 2021-10-17 21:48:02 +07:00
Hoang Nguyen b2ad295899
qutebrowser: update config to 2.3.0; lite-xl: additional font config 2021-10-17 21:48:01 +07:00
Hoang Nguyen f7b271fc59
Add xdg-desktop-portal-wlr config 2021-10-17 21:48:01 +07:00
Hoang Nguyen 432883e6cf
foot: update config to 1.8.0 2021-10-17 21:48:01 +07:00
Hoang Nguyen 8858fe03eb
river: add config for new option set-cursor-warp 2021-10-17 21:48:01 +07:00
Hoang Nguyen 02e98263ae
waybar: add tray module 2021-10-17 21:48:01 +07:00
Hoang Nguyen 4f17266b0b
nftables: move rate limit above established connections 2021-10-17 21:48:01 +07:00
Hoang Nguyen 7dfc942338
nftables: move nat to another table for visibility 2021-10-17 21:48:01 +07:00
Hoang Nguyen 85b24cdbe7
nftables: add libvirt rules for NAT 2021-10-17 21:48:01 +07:00
Hoang Nguyen 0e5f88739f
system: add network note 2021-10-17 21:48:01 +07:00
Hoang Nguyen 657c371abe
shells: update pyenv initial process
pyenv doesn't set path with `init -` anymore.
Also set PATH only once in login shell.
2021-10-17 21:48:01 +07:00
Hoang Nguyen 6adbf27693
river: add some input configuration 2021-10-17 21:48:01 +07:00
Hoang Nguyen 9340e3f9b5
Add qtcreator themes 2021-10-17 21:48:00 +07:00
Hoang Nguyen a13921809f
tlp: update config template for AC 2021-10-17 21:48:00 +07:00
Hoang Nguyen 7240be331e
system: add tlp config template 2021-10-17 21:48:00 +07:00
Hoang Nguyen 16c7177046
Set qutebrowser -> firefox as default browser 2021-10-17 21:48:00 +07:00
Hoang Nguyen 5ca2f568df
neovim/emacs: I'm a 4-space guy now 2021-10-17 21:48:00 +07:00
Hoang Nguyen 4e108abbbd
system: add configurations 2021-10-17 21:48:00 +07:00
Hoang Nguyen 4a8718a544
setup: install things to ~/.local instead of /usr
And some clean up
2021-10-17 21:48:00 +07:00
Hoang Nguyen c33b27332c
zoxide: move ranger.py to deploy.sh 2021-10-17 21:48:00 +07:00
Hoang Nguyen 33f9026493
river: add attach-mode 2021-10-17 21:48:00 +07:00
Hoang Nguyen 1c0e61cb2f
setup: revive nnn.sh setup script
Update READE, delete youbest shell alias
2021-10-17 21:48:00 +07:00
Hoang Nguyen a1fdf46ce2
emacs: vendor org-tree-slide config
Also some irc stuff
2021-10-17 21:47:59 +07:00
Hoang Nguyen 30ed001766
nnn: update settings for v4.1
Also WMs: clean up application rules
2021-10-17 21:47:59 +07:00
Hoang Nguyen 3d0e045de2
foot: use lowercase in key bindings 2021-10-17 21:47:59 +07:00
Hoang Nguyen 2e7f56c14a
Fix path to new Doom Emacs 2021-10-17 21:47:59 +07:00
Hoang Nguyen bd949936d5
emacs: use chemacs2 2021-10-17 21:47:59 +07:00
Hoang Nguyen c71508f34d
Various changes
- emacs: bye freenode
- nwg-bar: back to elogind (bug: can't use polkit)
- Wayland: start pulseaudio server in config (instead of system config)
- Update README
2021-10-17 21:47:59 +07:00
Hoang Nguyen e598aedd3f
Add Element custom themes 2021-10-17 21:47:59 +07:00
Hoang Nguyen f7ead96d6b
Steal weechat's theme + update lazygit config 2021-10-17 21:47:59 +07:00
Hoang Nguyen 64606281de
Add lite-xl basic config 2021-10-17 21:47:59 +07:00
Hoang Nguyen a8f6481710
kitty: update config 2021-10-17 21:47:59 +07:00
Hoang Nguyen e971b784d1
Remove words.txt
Use words-en (aspell) package instead
2021-10-17 21:47:59 +07:00
Hoang Nguyen 2ca7ebcb11
Add tg config
Also fix `dict` (words.txt is in Windows format)
2021-10-17 21:47:58 +07:00
Hoang Nguyen 11d1adce49
Avoid 13pt font size 2021-10-17 21:47:58 +07:00
Hoang Nguyen 09ec1653bd
setup: add words.txt 2021-10-17 21:47:58 +07:00
Hoang Nguyen 045fa07a15
Add fontconfig, umask and silent pyenv init 2021-10-17 21:47:58 +07:00
Hoang Nguyen f35ff9461c
setup: add cht.sh
Also drop termite config
2021-10-17 21:47:58 +07:00
Hoang Nguyen 7af335cfb7
emacs: add eshell-info-banner 2021-10-17 21:47:58 +07:00
Hoang Nguyen 4c996a6311
shell: set MANPATH in man() function instead 2021-10-17 21:47:58 +07:00
Hoang Nguyen 9164d14ff1
wayfire: add simple-tile plugin config 2021-10-17 21:47:58 +07:00
Hoang Nguyen 743b4b6445
shells: add custom manpath 2021-10-17 21:47:58 +07:00
Hoang Nguyen 622b6e4e63
forgit: fix setting env logic 2021-10-17 21:47:58 +07:00
Hoang Nguyen 0423ec56e6
setup: use sh -e; forgit: add clipboard env var 2021-10-17 21:47:58 +07:00
Hoang Nguyen 8688bd5364
greenclip: new config v4.0; delete stuff 2021-10-17 21:47:57 +07:00
Hoang Nguyen 05875b9a3b
shells: change default rsync flags 2021-10-17 21:47:57 +07:00
Hoang Nguyen d5b8b27fb2
nnn: update .nmv 2021-10-17 21:47:57 +07:00
Hoang Nguyen 7c2509c1c8
neovim: use custom parenthesis colors 2021-10-17 21:47:52 +07:00
Hoang Nguyen d2e4a05027
river: update config (river-options is gone) 2021-10-17 21:47:51 +07:00
Hoang Nguyen c56cd923d3
setup: add installer for waifu2x-converter-cpp 2021-10-17 21:47:51 +07:00
Hoang Nguyen ffdb51e5b1
emacs: update fonts 2021-10-17 21:47:51 +07:00
Hoang Nguyen 4f735592c6
nnn: update plugins 2021-10-17 21:47:51 +07:00
Hoang Nguyen cec99f521a
wayfire: add extra plugins 2021-10-17 21:47:51 +07:00
Hoang Nguyen 8b43e93a84
setup: add notes for Anime4K installer 2021-10-17 21:47:51 +07:00
Hoang Nguyen f37e651c10
setup: fix colorscript installer 2021-10-17 21:47:51 +07:00
Hoang Nguyen c09b86e0da
river: update config for river-options-v2
Also get rid of the colorscripts
2021-10-17 21:47:51 +07:00
Hoang Nguyen 6298f0c69a
anime-downloader: fix config 2021-10-17 21:47:51 +07:00
Hoang Nguyen bd6117c8b4
emacs: steal nice things from tecosaur's config 2021-10-17 21:47:50 +07:00
Hoang Nguyen 7120885076
emacs, fish: update package list 2021-10-17 21:47:50 +07:00
Hoang Nguyen 36f49bce52
Abuse fish-shell for XDG_RUNTIME_DIR 2021-10-17 21:47:50 +07:00
Hoang Nguyen 5573edd51b
fish: update fisher, various changes 2021-10-17 21:47:50 +07:00
Hoang Nguyen ca7de54b35
Clean up unnecessary stuff 2021-10-17 21:47:50 +07:00
Hoang Nguyen 3f981be233
emacs: update init.el to reflect upstream 2021-10-17 21:47:50 +07:00
Hoang Nguyen 4b9fd1ed30
emacs: update config for new commits 2021-10-17 21:47:50 +07:00
Hoang Nguyen fbda5add66
qutebrowser: update new config v2.2.0 2021-10-17 21:47:50 +07:00
Hoang Nguyen b8787b2c8d
emacs: add +hugo flag for org module 2021-10-17 21:47:50 +07:00
Hoang Nguyen 69df55f6ce
seatd: remove `loginctl` hardcoded 2021-10-17 21:47:50 +07:00
Hoang Nguyen 2e416c8842
xonsh: use XDG path 2021-10-17 21:47:50 +07:00
Hoang Nguyen 42089e295f
zoxide: add nushell + xonsh init 2021-10-17 21:47:49 +07:00
Hoang Nguyen 6dcec7b3ca
Emacs/Neovim: add tldr 2021-10-17 21:47:49 +07:00
Hoang Nguyen ea8f9b05d6
setup: add Anime4K stuff; fish: add colors setting 2021-10-17 21:47:49 +07:00
Hoang Nguyen 77e7b38ed8
setup: add installer for `afetch` 2021-10-17 21:47:49 +07:00
Hoang Nguyen fa91461823
direnv: tweak hook for fish shell 2021-10-17 21:47:49 +07:00
Hoang Nguyen c4906f8339
vifm: some tweaks 2021-10-17 21:47:49 +07:00
Hoang Nguyen 340c74170a
ranger: prefer qimgv for image files 2021-10-17 21:47:49 +07:00
Hoang Nguyen df64b5e7cc
exa: add --sort=type 2021-10-17 21:47:49 +07:00
Hoang Nguyen 90b894149a
Another 'Various changes' 2021-10-17 21:47:49 +07:00
Hoang Nguyen c46c2d8c04
Various changes 2021-10-17 21:47:49 +07:00
Hoang Nguyen 188cdc6b88
nnn: update plugins
Also drop `elvish` and `ion` config
2021-10-17 21:47:48 +07:00
Hoang Nguyen dd0784924a
wayfire: change default window decoration 2021-10-17 21:47:48 +07:00
Hoang Nguyen 8379927ec7
emacs: adjust some settings 2021-10-17 21:47:48 +07:00
Hoang Nguyen 3dc8848a53
wayfire: update config 2021-10-17 21:47:48 +07:00
Hoang Nguyen b7f4d23dbc
nnn: fix typo in env var 2021-10-17 21:47:48 +07:00
Hoang Nguyen 3c3eca3c12
emacs: adjust org-mode config 2021-10-17 21:47:48 +07:00
Hoang Nguyen 89fadd6b81
zoxide: fix curl link 2021-10-17 21:47:48 +07:00
Hoang Nguyen 1ae7955856
tree -> exa for previewing directories 2021-10-17 21:47:48 +07:00
Hoang Nguyen 1ba97b4a54
Simplify the fzf script for `yay` 2021-10-17 21:47:48 +07:00
Hoang Nguyen 9a3dae27c5
Add gitignore for setup dir 2021-10-17 21:47:48 +07:00
Hoang Nguyen 309a920067
Add -r for xargs 2021-10-17 21:47:48 +07:00
Hoang Nguyen 3e8194f5ee
forgot prefix in setup scripts 2021-10-17 21:47:47 +07:00
Hoang Nguyen 496ed55677
nnn: update flag 2021-10-17 21:47:47 +07:00
Hoang Nguyen b1f816c916
Casual cleanup 2021-10-17 21:47:47 +07:00
Hoang Nguyen 71241ad12b
elvish: add to deploy script 2021-10-17 21:47:47 +07:00
Hoang Nguyen cac1caa806
Add basic elvish shell config 2021-10-17 21:47:47 +07:00
Hoang Nguyen c71be40398
nnn: add to deploy.sh 2021-10-17 21:47:47 +07:00
Hoang Nguyen 7832e74c91
nnn: some tweaks 2021-10-17 21:47:47 +07:00
Hoang Nguyen 6cf209aac3
nnn: change default flags when opening 2021-10-17 21:47:47 +07:00
Hoang Nguyen 14e7b8399f
nnn: use better colors 2021-10-17 21:47:47 +07:00
Hoang Nguyen 04310da09e
neovim: reconfigure nnn.vim 2021-10-17 21:47:47 +07:00
Hoang Nguyen c50d0a100e
Improve integration for TUI file managers 2021-10-17 21:47:46 +07:00
Hoang Nguyen dcd525c8bb
foot: update config 2021-10-17 21:47:46 +07:00
Hoang Nguyen 8b9c2a2d30
Add a pandoc compile script 2021-10-17 21:47:46 +07:00
Hoang Nguyen e0a3568cb5
Update deploy.sh 2021-10-17 21:47:46 +07:00
Hoang Nguyen 1f81225ca4
neovim: translator.vim -> translate-shell.vim 2021-10-17 21:47:46 +07:00
Hoang Nguyen 70a255ad39
Add pipe-viewer config 2021-10-17 21:47:46 +07:00
Hoang Nguyen eed4f4c0b9
bat: use config file instead of multiple env vars 2021-10-17 21:47:46 +07:00
Hoang Nguyen 2a14e9b07d
qutebrowser: typo in config 2021-10-17 21:47:46 +07:00
Hoang Nguyen b6ddbcb73c
Pretify `dict` script 2021-10-17 21:47:46 +07:00
Hoang Nguyen 30cd42b7b2
Add jq to ipinfo 2021-10-17 21:47:46 +07:00
Hoang Nguyen 0823dfb1e6
Split curl scripts 2021-10-17 21:47:45 +07:00
Hoang Nguyen 21885bb001
emacs: add mu4e, circe, mozc 2021-10-17 21:47:45 +07:00
Hoang Nguyen a7712d50da
Half revert last commit 2021-10-17 21:47:45 +07:00
Hoang Nguyen 8e7e617baa
nnn: add `renamer` plugin 2021-10-17 21:47:45 +07:00
Hoang Nguyen a784801bad
x11: add `monitors.sh` script 2021-10-17 21:47:45 +07:00
Hoang Nguyen c40bc875bf
font: change Sarasa Fixed to Sarasa Mono 2021-10-17 21:47:45 +07:00
Hoang Nguyen ffdbba29bd
Add xlsx2csv 2021-10-17 21:47:45 +07:00
Hoang Nguyen a310411790
z: adjust fzf flags 2021-10-17 21:47:45 +07:00
Hoang Nguyen 766a8dedaa
z: use `zoxide` instead of `z.lua` 2021-10-17 21:47:45 +07:00
Hoang Nguyen dcc6d87aa3
emacs: turn on `latex` module 2021-10-17 21:47:45 +07:00
Hoang Nguyen 8b7d7766f9
emacs: revert default git-gutter style 2021-10-17 21:47:44 +07:00
Hoang Nguyen 2c192cfea6
emacs: prefer `emms` module 2021-10-17 21:47:44 +07:00
Hoang Nguyen fa8c927842
waybar: change the `useless` network config 2021-10-17 21:47:44 +07:00
Hoang Nguyen 475a804e96
fish: avoid `alias cat` for completion 2021-10-17 21:47:44 +07:00
Hoang Nguyen 4c6fdbceb2
emacs: adjust config for lua-language-server 2021-10-17 21:47:44 +07:00
Hoang Nguyen 2f350e4145
x11: add sanity check for starting exwm 2021-10-17 21:47:44 +07:00
Hoang Nguyen 312c2df5fe
emacs: add more bloats 2021-10-17 21:47:44 +07:00
Hoang Nguyen 40c9496e1f
emacs/neovim: add `lua-language-server` 2021-10-17 21:47:12 +07:00
20 changed files with 311 additions and 209 deletions

View File

@ -30,7 +30,7 @@
### :star2: Credits
- [@glepnir](https://github.com/glepnir/nvim)'s Neovim config, and also [NvChad](https://github.com/NvChad/NvChad)
- [@glepnir](https://github.com/glepnir/nvim)'s Neovim config, also [NvChad](https://github.com/NvChad/NvChad) and [nord.nvim](https://github.com/shaunsingh/nord.nvim)
- [@novakane](https://git.sr.ht/~novakane/) for git aliases
- [@hlissner](https://github.com/hlissner)'s zsh config
- [@daviwil](https://github.com/daviwil)'s/[@tecosaur](https://tecosaur.github.io/emacs-config/config.html)'s Emacs configurations

View File

@ -0,0 +1 @@
require('themes').set('nord')

View File

@ -0,0 +1 @@
require('themes').set('onedark')

View File

@ -10,5 +10,4 @@ local options = require('options')
options.disable_default_plugins()
options.load_options()
require('colors.' .. vim.g.global_theme).highlight()
async:send()

View File

@ -47,11 +47,11 @@ wk.register({
-- Close a window
['<C-q>'] = {'<C-w>q', 'Quit current window'},
-- Copy the whole buffer
['<C-a>'] = {':%y+<CR>', 'Copy whole buffer'},
-- Close current buffer
['<A-q>'] = {':bdelete<CR>', 'Close current buffer'},
-- Close buffer
['<C-x>'] = {':bdelete<CR>', 'Close current buffer'},
-- Copy the whole buffer
['<A-a>'] = {':%y+<CR>', 'Copy whole buffer'},
-- Remove trailing whitespace
['<A-w>'] = {':%s/\\s\\+$//e<CR>', 'Remove trailing'},
@ -215,6 +215,7 @@ wk.register({
name = 'Editor',
a = {':EasyAlign<CR>', 'Align elements'},
g = 'Generate annotations',
h = {':TSHighlightCapturesUnderCursor<CR>', 'Syntax groups under cursor'},
s = {':ISwapWith<CR>', 'Swap elements'},
t = {':Twilight<CR>', 'Twilight mode'},
z = {':ZenMode<CR>', 'Zen mode'}
@ -294,7 +295,6 @@ wk.register({
f = {
name = 'Telescope',
a = {':Telescope lsp_code_actions<CR>', 'Code actions'},
A = {':Telescope lsp_range_code_actions<CR>', 'Range code actions'},
d = {':Telescope lsp_document_diagnostics<CR>', 'Buffer diagnostics'},
D = {':Telescope lsp_workspace_diagnostics<CR>', 'Workspace diagnostics'},
e = {':Telescope lsp_dynamic_workspace_symbols<CR>', 'Dynamic workspace symbols'},
@ -390,6 +390,15 @@ wk.register({
c = {'c<C-R>=system(\'trans -brief -no-ansi :\', getreg(""))[:-2]<S-Left><S-Left><Right>', 'Translate and replace with direction'}
},
l = {
name = 'LSP',
f = {
name = 'Telescope',
a = {':Telescope lsp_range_code_actions<CR>', 'Range code actions'}
},
o = 'Range format'
},
p = 'Find/Replace'
}, {mode = 'v', prefix = '<leader>'})

View File

@ -107,7 +107,30 @@ function M.treesitter_conf()
}
}
},
matchup = {enable = true}
matchup = {enable = true},
playground = {
enable = true,
disable = {},
updatetime = 25,
persist_queries = false,
keybindings = {
toggle_query_editor = 'o',
toggle_hl_groups = 'i',
toggle_injected_languages = 't',
toggle_anonymous_nodes = 'a',
toggle_language_display = 'I',
focus_language = 'f',
unfocus_language = 'F',
update = 'R',
goto_node = '<cr>',
show_help = '?'
}
},
query_linter = {
enable = true,
use_virtual_text = true,
lint_events = {'BufWrite', 'CursorHold'}
}
}
-- tree-sitter based folding
@ -254,7 +277,7 @@ end
function M.project_conf()
require('project_nvim').setup {
manual_mode = false,
detection_methods = {'pattern', 'lsp'},
detection_methods = {'lsp', 'pattern'},
patterns = {'.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile', 'package.json', '*.pro', 'Dockerfile', '>Code'},
show_hidden = true,
silent_chdir = true,

View File

@ -29,8 +29,11 @@ function M.lsp_conf()
if client.resolved_capabilities.document_formatting then
buf_set_keymap('n', '<leader>lo', ':lua vim.lsp.buf.formatting()<CR>', opts)
-- vim.api.nvim_command('autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()')
elseif client.resolved_capabilities.document_range_formatting then
buf_set_keymap('n', '<leader>lo', ':lua vim.lsp.buf.range_formatting({},{0,0},{vim.fn.line("$"),0})<CR>', opts)
buf_set_keymap('v', '<leader>lo', ':lua vim.lsp.buf.range_formatting()<CR>', opts)
-- vim.api.nvim_command('autocmd BufWritePre <buffer> lua vim.lsp.buf.range_formatting({},{0,0},{vim.fn.line("$"),0})')
end
-- Attach lsp_signature.nvim
@ -38,7 +41,7 @@ function M.lsp_conf()
bind = true, -- This is mandatory, otherwise border config doesn't work
floating_window = true,
fix_pos = true,
hint_prefix = '🐬 ',
hint_prefix = ' ',
transpancy = 5,
handler_opts = {border = 'none'},
zindex = 50, -- set to 200 to make the float window on top of others
@ -66,6 +69,12 @@ function M.lsp_conf()
}
}
-- Replace the default lsp diagnostic letters with prettier symbols
vim.fn.sign_define('LspDiagnosticsSignError', {text = ''})
vim.fn.sign_define('LspDiagnosticsSignWarning', {text = ''})
vim.fn.sign_define('LspDiagnosticsSignInformation', {text = ''})
vim.fn.sign_define('LspDiagnosticsSignHint', {text = ''})
---------------------------
-- Server configurations --
---------------------------
@ -255,8 +264,6 @@ function M.lsp_conf()
}
}
-- TODO: efm-langserver
-- Others
local servers = {
rust_analyzer = {'rust-analyzer'},
@ -277,11 +284,31 @@ function M.lsp_conf()
}
end
-- Replace the default lsp diagnostic letters with prettier symbols
vim.fn.sign_define('LspDiagnosticsSignError', {text = ''})
vim.fn.sign_define('LspDiagnosticsSignWarning', {text = ''})
vim.fn.sign_define('LspDiagnosticsSignInformation', {text = ''})
vim.fn.sign_define('LspDiagnosticsSignHint', {text = ''})
------------------------
-- Linters/Formatters --
------------------------
-- TODO: efm-langserver as another option
local null_ls = require('null-ls')
-- Register sources
null_ls.config {
sources = {
-- Formatters
null_ls.builtins.formatting.stylua.with {
condition = function(utils)
return utils.root_has_file('stylua.toml')
end
},
null_ls.builtins.formatting.clang_format.with {
filetypes = {'c', 'cpp'}
}
-- Linters
}
}
lspconf['null-ls'].setup {
on_attach = on_attach
}
end
function M.sqls_conf()
@ -292,7 +319,7 @@ end
function M.lightbulb_conf()
vim.api.nvim_command [[
autocmd CursorHold,CursorHoldI * lua require('nvim-lightbulb').update_lightbulb {sign = {enabled = false}, status_text = {enabled = true, text = ' Code action', text_unavailable = ''}}
autocmd CursorHold * lua require('nvim-lightbulb').update_lightbulb({sign = {enabled = false}, status_text = {enabled = true, text = ' Code action', text_unavailable = ''}})
]]
end
@ -344,9 +371,9 @@ end
-- exclude = {'org'}, -- list of file types to exclude highlighting
-- },
-- colors = {
-- error = {'LspDiagnosticsDefaultError', 'Red'},
-- warning = {'LspDiagnosticsDefaultWarning', 'Yellow'},
-- info = {'LspDiagnosticsDefaultInformation', 'Blue'},
-- error = {'LspDiagnosticsDefaultError', 'TSDanger', 'Red'},
-- warning = {'LspDiagnosticsDefaultWarning', 'TSWarning', 'Yellow'},
-- info = {'LspDiagnosticsDefaultInformation', 'TSNote', 'Blue'},
-- hint = {'LspDiagnosticsDefaultHint', 'Cyan'},
-- default = {'Normal', 'White'}
-- },
@ -375,9 +402,6 @@ function M.outline_conf()
}
end
function M.null_ls_conf()
end
function M.dap_conf()
local dap = require('dap')
vim.fn.sign_define('DapBreakpoint', {text='', texthl='Orange'})

View File

@ -108,7 +108,7 @@ function M.rest_conf()
end
function M.orgmode_conf()
local c = require('colors.' .. vim.g.global_theme).colors
local c = require('themes.' .. vim.g.colors_name .. '.colors')
require('orgmode').setup {
-- General settings
@ -247,7 +247,7 @@ function M.neoscroll_conf()
end
function M.sniprun_conf()
local c = require('colors.' .. vim.g.global_theme).colors
local c = require('themes.' .. vim.g.colors_name .. '.colors')
require('sniprun').setup {
display = {
@ -348,7 +348,7 @@ function M.winpicker_conf()
keys = 'alskdjfhgwoeiruty',
-- Swap windows by holding shift + letter
swap_shift = true,
exclude = {qf = true, NvimTree = true, packer = true, alpha = true},
exclude = {NvimTree = true, alpha = true},
-- Flash the cursor line of the newly focused window
flash_duration = 300
}

View File

@ -94,7 +94,7 @@ function M.dashboard_conf()
end
function M.statusline_conf()
local colors = require('colors.' .. vim.g.global_theme).colors
local colors = require('themes.' .. vim.g.colors_name .. '.colors')
local vi_mode_colors = {
NORMAL = colors.green,

View File

@ -24,12 +24,12 @@ function M.disable_default_plugins()
end
function M.load_options()
-- Global theme
vim.g.global_theme = 'nord'
-- This is the same as `:colorscheme nord/onedark`
vim.g.colors_name = 'nord'
-- Leader key
vim.g.mapleader = ' '
-- Python path
vim.g.python_host_prog = '/usr/bin/python'
-- vim.g.python_host_prog = '/usr/bin/python'
vim.g.python3_host_prog = '/usr/bin/python3'
-- General settings

View File

@ -24,6 +24,7 @@ return packer.startup(function(use)
}
use {
'famiu/feline.nvim',
event = 'VimEnter',
wants = 'nvim-web-devicons',
config = ui.statusline_conf
}
@ -74,6 +75,9 @@ return packer.startup(function(use)
event = 'BufRead',
config = editor.treesitter_conf
}
use {'nvim-treesitter/playground', after = 'nvim-treesitter'}
use {'romgrk/nvim-treesitter-context', after = 'nvim-treesitter'}
use {'nvim-treesitter/nvim-treesitter-textobjects', after = 'nvim-treesitter'}
-- use {
-- 'lewis6991/spellsitter.nvim',
-- event = {'BufRead', 'BufNew', 'BufNewFile'},
@ -90,8 +94,6 @@ return packer.startup(function(use)
-- Putting config into `treesitter_conf` doesn't work for some reason
config = editor.rainbow_conf
}
use {'romgrk/nvim-treesitter-context', after = 'nvim-treesitter'}
use {'nvim-treesitter/nvim-treesitter-textobjects', after = 'nvim-treesitter'}
use {
'mizlan/iswap.nvim',
cmd = {'ISwapWith', 'ISwap'},
@ -175,8 +177,14 @@ return packer.startup(function(use)
use {
'neovim/nvim-lspconfig',
event = 'BufReadPre',
wants = 'lsp_signature.nvim',
requires = {{'ray-x/lsp_signature.nvim', opt = true}},
wants = {'lsp_signature.nvim', 'null-ls.nvim'},
requires = {
{'ray-x/lsp_signature.nvim', opt = true},
{ -- TODO: scripts to install linters/formatters, config
'jose-elias-alvarez/null-ls.nvim',
wants = 'plenary.nvim', opt = true
}
},
config = lsp.lsp_conf
}
use {
@ -206,12 +214,6 @@ return packer.startup(function(use)
cmd = {'SymbolsOutline', 'SymbolsOutlineOpen'},
setup = lsp.outline_conf
}
use { -- TODO: config, scripts to install formaters, linters
'jose-elias-alvarez/null-ls.nvim',
wants = 'plenary.nvim',
after = 'nvim-lspconfig',
config = lsp.null_ls_conf
}
use { -- TODO: config, scripts to install/update dap servers
'rcarriga/nvim-dap-ui',
keys = '<leader>d',

View File

@ -0,0 +1,29 @@
local M = {}
function M.set(theme)
-- Reset everything
vim.api.nvim_command('hi clear')
if vim.fn.exists('syntax_on') then vim.api.nvim_command('syntax reset') end
vim.opt.background = 'dark'
-- Get theme specs
local t = require('themes.' .. theme)
vim.g.colors_name = theme
-- Load highlight groups
local async
async = vim.loop.new_async(vim.schedule_wrap(function()
t.set_vim_termcolors()
t.highlight_plugins()
t.highlight_languages()
t.highlight_treesitter()
t.highlight_lsp()
async:close()
end))
t.highlight_editor()
t.highlight_syntax()
async:send() -- Load the rest later
end
return M

View File

@ -0,0 +1,22 @@
local nord = {
black = '#2E3440',
grey1 = '#3B4252',
grey2 = '#434C5E',
grey3 = '#4C566A',
grey_bright = '#616E88',
fg = '#D8DEE9',
white1 = '#E5E9F0',
white2 = '#ECEFF4',
teal = '#8FBCBB',
cyan = '#88C0D0',
blue = '#81A1C1',
dark_blue = '#5E81AC',
red = '#BF616A',
orange = '#D08770',
yellow = '#EBCB8B',
green = '#A3BE8C',
purple = '#B48EAD',
highlight = '#7B88A1'
}
return nord

View File

@ -1,40 +1,11 @@
local cmd = vim.api.nvim_command
local M = {}
M.colors = {
black = '#2E3440',
grey1 = '#3B4252',
grey2 = '#434C5E',
grey3 = '#4C566A',
grey_bright = '#616E88',
fg = '#D8DEE9',
white1 = '#E5E9F0',
white2 = '#ECEFF4',
teal = '#8FBCBB',
cyan = '#88C0D0',
blue = '#81A1C1',
dark_blue = '#5E81AC',
red = '#BF616A',
orange = '#D08770',
yellow = '#EBCB8B',
green = '#A3BE8C',
purple = '#B48EAD',
highlight = '#7B88A1'
}
local c = M.colors
local function hi(group, guifg, guibg, attr, guisp)
local fg = guifg ~= '' and 'guifg=' .. guifg or 'guifg=NONE'
local bg = guibg ~= '' and 'guibg=' .. guibg or 'guibg=NONE'
local style = attr ~= '' and 'gui=' .. attr or 'gui=NONE'
local sp = guisp ~= '' and 'guisp=' .. guisp or ''
local hl = 'hi ' .. group .. ' ' .. fg .. ' ' .. bg .. ' ' .. style .. ' ' .. sp
vim.api.nvim_command(hl)
end
local c = require('themes.nord.colors')
local hi = require('themes.util').highlight
-- Set terminal colors
local function set_vim_termcolors()
function M.set_vim_termcolors()
vim.g.terminal_color_0 = c.grey1
vim.g.terminal_color_1 = c.red
vim.g.terminal_color_2 = c.green
@ -54,7 +25,7 @@ local function set_vim_termcolors()
end
-- Editor related groups
local function highlight_editors()
function M.highlight_editor()
-- Color groups for other uses
hi('Red', c.red, '', '', '')
hi('Green', c.green, '', '', '')
@ -110,7 +81,7 @@ local function highlight_editors()
-- Prompt
hi('EndOfBuffer', c.grey1, '' , '', '')
hi('ErrorMsg' , c.fg , c.red , '', '')
hi('ModeMsg' , c.green, '' , '', '')
hi('ModeMsg' , c.fg , '' , '', '')
hi('MoreMsg' , c.cyan , '' , '', '')
hi('Question' , c.fg , '' , '', '')
hi('WarningMsg' , c.black, c.yellow, '', '')
@ -137,7 +108,7 @@ local function highlight_editors()
end
-- Syntax groups
local function highlight_syntax()
function M.highlight_syntax()
-- Base syntax
hi('Boolean', c.blue, '', '', '')
hi('Character', c.fg, '', '', '')
@ -153,7 +124,7 @@ local function highlight_syntax()
hi('Function', c.cyan, '', '', '')
hi('Identifier', c.fg, '', '', '')
hi('Include', c.blue, '', '', '')
hi('Keyword', c.blue, '', '', '')
hi('Keyword', c.blue, '', 'bold', '')
hi('Label', c.blue, '', '', '')
hi('Number', c.purple, '', '', '')
hi('Operator', c.blue, '', '', '')
@ -170,14 +141,10 @@ local function highlight_syntax()
hi('Todo', c.yellow, '', '', '')
hi('Type', c.blue, '', '', '')
hi('Typedef', c.blue, '', '', '')
vim.api.nvim_command('hi! link Annotation Decorator')
vim.api.nvim_command('hi! link Macro Define')
vim.api.nvim_command('hi! link PreCondit PreProc')
vim.api.nvim_command('hi! link Variable Identifier')
-- sql
vim.api.nvim_command('hi! link sqlKeyword Keyword')
vim.api.nvim_command('hi! link sqlSpecial Keyword')
cmd('hi! link Annotation Decorator')
cmd('hi! link Macro Define')
cmd('hi! link PreCondit PreProc')
cmd('hi! link Variable Identifier')
-- Diff
hi('DiffAdd' , c.green , c.grey1, '', '')
@ -190,66 +157,107 @@ local function highlight_syntax()
hi('diffFile', c.cyan, c.grey1, '', '')
hi('diffLine', c.purple, c.grey1, '', '')
hi('diffIndexLine', c.fg, c.grey1, '', '')
vim.api.nvim_command('hi! link diffAdded DiffAdd')
vim.api.nvim_command('hi! link diffRemoved DiffDelete')
vim.api.nvim_command('hi! link diffChanged DiffChange')
cmd('hi! link diffAdded DiffAdd')
cmd('hi! link diffRemoved DiffDelete')
cmd('hi! link diffChanged DiffChange')
end
-- Treesitter
local function highlight_treesitter()
hi('TSPunctDelimiter', c.fg, '', '', '')
hi('TSPunctBracket', c.fg, '', '', '')
hi('TSPunctSpecial', c.fg, '', '', '')
hi('TSConstant', c.yellow, '', '', '')
hi('TSConstBuiltin', c.blue, '', '', '')
hi('TSConstMacro', c.yellow, '', '', '')
hi('TSStringRegex', c.green, '', '', '')
hi('TSString', c.green, '', '', '')
hi('TSStringEscape', c.green, '', '', '')
-- Things that still don't look right with nvim-treesitter
function M.highlight_languages()
-- sql
cmd('hi! link sqlKeyword Keyword')
cmd('hi! link sqlSpecial Keyword')
-- markdown
hi('markdownCode', c.fg, '', 'italic', '')
hi('markdownCodeBlock', c.fg, '', 'italic', '')
hi('markdownH1', c.purple, '', 'bold', '')
cmd('hi! link markdownH1Delimiter markdownH1')
hi('markdownH2', c.dark_blue, '', 'bold', '')
cmd('hi! link markdownH2Delimiter markdownH2')
hi('markdownH3', c.blue, '', 'bold', '')
cmd('hi! link markdownH3Delimiter markdownH3')
hi('markdownH4', c.cyan, '', 'bold', '')
cmd('hi! link markdownH4Delimiter markdownH4')
hi('markdownH5', c.teal, '', 'bold', '')
cmd('hi! link markdownH5Delimiter markdownH5')
hi('markdownH6', c.green, '', 'bold', '')
cmd('hi! link markdownH6Delimiter markdownH6')
-- html
hi('htmlLink', c.green, '', 'underline', '')
cmd('hi! link htmlH1 markdownH1')
cmd('hi! link htmlH2 markdownH2')
cmd('hi! link htmlH3 markdownH3')
cmd('hi! link htmlH4 markdownH4')
cmd('hi! link htmlH5 markdownH5')
cmd('hi! link htmlH6 markdownH6')
end
-- Treesitter (:h nvim-treesitter-highlights)
function M.highlight_treesitter()
cmd('hi! link TSAnnotation Annotation')
hi('TSCharacter', c.green, '', '', '')
hi('TSNumber', c.purple, '', '', '')
hi('TSBoolean', c.purple, '', '', '')
hi('TSConstructor', c.blue, '', '', '')
hi('TSConstant', c.yellow, '', '', '')
hi('TSFloat', c.purple, '', '', '')
hi('TSAttribute', c.teal, '', '', '')
hi('TSNamespace', c.fg, '', '', '')
hi('TSMethod', c.cyan, '', '', '')
hi('TSField', c.fg, '', '', '')
hi('TSProperty', c.fg, '', '', '')
hi('TSConditional', c.blue, '', '', '')
hi('TSParameter', c.purple, '', '', '')
hi('TSParameterReference', c.purple, '', '', '')
hi('TSRepeat', c.blue, '', '', '')
hi('TSLabel', c.blue, '', '', '')
hi('TSKeyword', c.blue, '', '', '')
hi('TSKeywordFunction', c.blue, '', '', '')
hi('TSKeywordOperator', c.blue, '', '', '')
hi('TSOperator', c.blue, '', '', '')
hi('TSException', c.red, '', '', '')
hi('TSType', c.teal, '', '', '')
hi('TSTypeBuiltin', c.blue, '', '', '')
hi('TSStructure', c.blue, '', '', '')
hi('TSNumber', c.purple, '', '', '')
hi('TSString', c.green, '', '', '')
hi('TSAttribute', c.purple, '', '', '')
cmd('hi! link TSBoolean Boolean')
hi('TSConstBuiltin', c.teal, '', '', '')
hi('TSConstMacro', c.teal, '', '', '')
hi('TSError', c.red, '', '', '')
hi('TSException', c.purple, '', '', '')
hi('TSField', c.teal, '', '', '')
hi('TSFuncMacro', c.teal, '', '', '')
hi('TSInclude', c.blue, '', '', '')
hi('TSVariableBuiltin', c.fg, '', '', '')
hi('TSLabel', c.purple, '', '', '')
hi('TSNamespace', c.fg, '', '', '')
hi('TSOperator', c.blue, '', '', '')
hi('TSParameter', c.purple, '', 'italic', '')
hi('TSParameterReference', c.purple, '', 'italic', '')
hi('TSProperty', c.teal, '', '', '')
hi('TSPunctDelimiter', c.fg, '', '', '')
hi('TSPunctBracket', c.cyan, '', '', '')
hi('TSPunctSpecial', c.cyan, '', '', '')
hi('TSStringRegex', c.teal, '', '', '')
hi('TSStringEscape', c.purple, '', '', '')
hi('TSSymbol', c.purple, '', '', '')
hi('TSType', c.blue, '', '', '')
hi('TSTypeBuiltin', c.blue, '', '', '')
hi('TSTag', c.fg, '', '', '')
hi('TSTagDelimiter', c.purple, '', '', '')
hi('TSText', c.fg, '', '', '')
hi('TSStrong', c.cyan, '', 'bold', '')
hi('TSEmphasis', c.cyan, '', 'bold,italic', '')
hi('TSUnderline', c.cyan, '', 'underline', '')
hi('TSTitle', c.cyan, '', '', '')
hi('TSLiteral', c.cyan, '', '', '')
hi('TSURI', c.fg, '', '', '')
hi('TSTag', c.blue, '', '', '')
hi('TSTagDelimiter', c.fg, '', '', '')
vim.api.nvim_command('hi! link TSAnnotation Annotation')
vim.api.nvim_command('hi! link TSConstructor Function')
-- vim.api.nvim_command('hi! link TSError Error')
vim.api.nvim_command('hi! link TSFuncBuiltin Function')
vim.api.nvim_command('hi! link TSFunction Function')
vim.api.nvim_command('hi! link TSFuncMacro Function')
vim.api.nvim_command('hi! link TSVariable Variable')
hi('TSTextReference', c.purple, '', '', '')
hi('TSEmphasis', c.fg, '', 'bold,italic', '')
cmd('hi! link TSUnderline Underline')
hi('TSTitle', c.dark_blue, '', 'bold', '')
hi('TSLiteral', c.fg, '', '', '')
hi('TSURI', c.green, '', 'underline', '')
cmd('hi! link TSComment Comment')
hi('TSConditional', c.blue, '', 'bold', '')
hi('TSKeyword', c.blue, '', 'bold', '')
hi('TSRepeat', c.blue, '', 'bold', '')
hi('TSKeywordFunction', c.blue, '', 'bold', '')
hi('TSKeywordOperator', c.blue, '', 'bold', '')
cmd('hi! link TSFunction Function')
hi('TSMethod', c.teal, '', '', '')
cmd('hi! link TSFuncBuiltin Function')
cmd('hi! link TSVariable Variable')
cmd('hi! link TSVariableBuiltin Variable')
cmd('hi! link TSStrong Bold')
cmd('hi! link TSStructure Structure')
hi('TSNote', c.blue, '', 'bold', '')
hi('TSWarning', c.yellow, '', 'bold', '')
hi('TSDanger', c.red, '', 'bold', '')
end
-- LSP groups
local function highlight_lsp()
function M.highlight_lsp()
hi('LspDiagnosticsDefaultError', c.red, '', '', '')
hi('LspDiagnosticsSignError', c.red, '', '', '')
hi('LspDiagnosticsFloatingError', c.red, '', '', '')
@ -277,29 +285,29 @@ local function highlight_lsp()
hi('LspReferenceText', c.fg, c.grey_bright, '', '')
hi('LspReferenceRead', c.fg, c.grey_bright, '', '')
hi('LspReferenceWrite', c.fg, c.grey_bright, '', '')
vim.api.nvim_command('hi! link LspCodeLens Comment')
cmd('hi! link LspCodeLens Comment')
-- Theses are for neovim 0.6
-- vim.api.nvim_command('hi! link DiagnosticVirtualTextWarn LspDiagnosticsVirtualTextWarning')
-- vim.api.nvim_command('hi! link DiagnosticUnderlineWarn LspDiagnosticsUnderlineWarning')
-- vim.api.nvim_command('hi! link DiagnosticFloatingWarn LspDiagnosticsFloatingWarning')
-- vim.api.nvim_command('hi! link DiagnosticSignWarn LspDiagnosticsSignWarning')
-- vim.api.nvim_command('hi! link DiagnosticVirtualTextError LspDiagnosticsVirtualTextError')
-- vim.api.nvim_command('hi! link DiagnosticUnderlineError LspDiagnosticsUnderlineError')
-- vim.api.nvim_command('hi! link DiagnosticFloatingError LspDiagnosticsFloatingError')
-- vim.api.nvim_command('hi! link DiagnosticSignError LspDiagnosticsSignError')
-- vim.api.nvim_command('hi! link DiagnosticVirtualTextInfo LspDiagnosticsVirtualTextInformation')
-- vim.api.nvim_command('hi! link DiagnosticUnderlineInfo LspDiagnosticsUnderlineInformation')
-- vim.api.nvim_command('hi! link DiagnosticFloatingInfo LspDiagnosticsFloatingInformation')
-- vim.api.nvim_command('hi! link DiagnosticSignInfo LspDiagnosticsSignInformation')
-- vim.api.nvim_command('hi! link DiagnosticVirtualTextHint LspDiagnosticsVirtualTextHint')
-- vim.api.nvim_command('hi! link DiagnosticUnderlineHint LspDiagnosticsUnderlineHint')
-- vim.api.nvim_command('hi! link DiagnosticFloatingHint LspDiagnosticsFloatingHint')
-- vim.api.nvim_command('hi! link DiagnosticSignHint LspDiagnosticsSignHint')
-- cmd('hi! link DiagnosticVirtualTextWarn LspDiagnosticsVirtualTextWarning')
-- cmd('hi! link DiagnosticUnderlineWarn LspDiagnosticsUnderlineWarning')
-- cmd('hi! link DiagnosticFloatingWarn LspDiagnosticsFloatingWarning')
-- cmd('hi! link DiagnosticSignWarn LspDiagnosticsSignWarning')
-- cmd('hi! link DiagnosticVirtualTextError LspDiagnosticsVirtualTextError')
-- cmd('hi! link DiagnosticUnderlineError LspDiagnosticsUnderlineError')
-- cmd('hi! link DiagnosticFloatingError LspDiagnosticsFloatingError')
-- cmd('hi! link DiagnosticSignError LspDiagnosticsSignError')
-- cmd('hi! link DiagnosticVirtualTextInfo LspDiagnosticsVirtualTextInformation')
-- cmd('hi! link DiagnosticUnderlineInfo LspDiagnosticsUnderlineInformation')
-- cmd('hi! link DiagnosticFloatingInfo LspDiagnosticsFloatingInformation')
-- cmd('hi! link DiagnosticSignInfo LspDiagnosticsSignInformation')
-- cmd('hi! link DiagnosticVirtualTextHint LspDiagnosticsVirtualTextHint')
-- cmd('hi! link DiagnosticUnderlineHint LspDiagnosticsUnderlineHint')
-- cmd('hi! link DiagnosticFloatingHint LspDiagnosticsFloatingHint')
-- cmd('hi! link DiagnosticSignHint LspDiagnosticsSignHint')
end
-- Specify groups for plugins
local function highlight_plugins()
function M.highlight_plugins()
-- nvim-cmp
hi('CmpItemAbbr', c.fg, '', '', '')
hi('CmpItemAbbrMatch', c.yellow, '', '', '')
@ -325,11 +333,11 @@ local function highlight_plugins()
hi('HopNextKey', c.red, '', 'bold', '')
hi('HopNextKey1', c.cyan, '', 'bold', '')
hi('HopNextKey2', c.dark_blue, '', '', '')
vim.api.nvim_command('hi! link HopUnmatched LineNr')
cmd('hi! link HopUnmatched LineNr')
-- vim-eft
hi('EftChar', c.orange, '', 'bold,underline', '')
vim.api.nvim_command('hi! link EftSubChar LineNr')
cmd('hi! link EftSubChar LineNr')
-- dashboard-nvim / alpha-nvim
hi('DashboardHeader' , c.blue , '', 'bold' , '')
@ -370,8 +378,8 @@ local function highlight_plugins()
hi('WindowPickerSwap', c.fg, c.orange, 'bold', '')
-- vim-illuminate
vim.api.nvim_command('hi! link illuminatedWord Underline')
vim.api.nvim_command('hi! link illuminatedCurWord Underline')
cmd('hi! link illuminatedWord Underline')
cmd('hi! link illuminatedCurWord Underline')
-- trouble.nvim
hi('LspTroubleText', c.blue, '', 'bold', '')
@ -398,26 +406,4 @@ local function highlight_plugins()
hi('NeogitNotificationError', c.red, '', '', '')
end
-- Main function
function M.highlight()
-- Reset everything
vim.api.nvim_command('hi clear')
if vim.fn.exists('syntax_on') then vim.api.nvim_command('syntax reset') end
vim.opt.background = 'dark'
-- Load highlight groups
local async
async = vim.loop.new_async(vim.schedule_wrap(function()
set_vim_termcolors()
highlight_plugins()
highlight_treesitter()
highlight_lsp()
async:close()
end))
highlight_editors()
highlight_syntax()
async:send() -- Load the rest later
end
return M

View File

@ -1,6 +1,4 @@
local M = {}
M.colors = {
local onedark = {
black = '#282C34',
grey1 = '#3E4452',
grey2 = '#4B5263',
@ -22,20 +20,4 @@ M.colors = {
highlight = '#9CA0A4'
}
local c = M.colors
local function hi(group, guifg, guibg, attr, guisp)
local fg = guifg ~= '' and 'guifg=' .. guifg or 'guifg=NONE'
local bg = guibg ~= '' and 'guibg=' .. guibg or 'guibg=NONE'
local style = attr ~= '' and 'gui=' .. attr or 'gui=NONE'
local sp = guisp ~= '' and 'guisp=' .. guisp or ''
local hl = 'hi ' .. group .. ' ' .. fg .. ' ' .. bg .. ' ' .. style .. ' ' .. sp
vim.api.nvim_command(hl)
end
function M.highlight()
hi('ModeMsg', c.green, '', '', '')
end
return M
return onedark

View File

@ -0,0 +1,10 @@
local M = {}
local c = require('themes.onedark.colors')
local hi = require('themes.util').highlight
function M.highlight_editor()
hi('ModeMsg', c.fg, '', '', '')
end
return M

View File

@ -0,0 +1,13 @@
local M = {}
function M.highlight(group, guifg, guibg, attr, guisp)
local fg = guifg ~= '' and 'guifg=' .. guifg or 'guifg=NONE'
local bg = guibg ~= '' and 'guibg=' .. guibg or 'guibg=NONE'
local style = attr ~= '' and 'gui=' .. attr or 'gui=NONE'
local sp = guisp ~= '' and 'guisp=' .. guisp or ''
local hl = 'hi ' .. group .. ' ' .. fg .. ' ' .. bg .. ' ' .. style .. ' ' .. sp
vim.api.nvim_command(hl)
end
return M

View File

@ -9,9 +9,9 @@ if [ -d "${server_path}" ]; then
git pull
else
git clone https://github.com/sumneko/lua-language-server.git ${server_path}
cd ${server_path}
fi
cd ${server_path}
git submodule update --init --recursive
# Build

View File

@ -18,6 +18,9 @@ chmod 755 $HOME/.local/bin/fzf/adl
curl -fL "https://github.com/pystardust/ytfzf/raw/master/ytfzf" -o $HOME/.local/bin/fzf/ytfzf
chmod 755 $HOME/.local/bin/fzf/ytfzf
curl -fL "https://github.com/pystardust/ani-cli/raw/master/ani-cli" -o $HOME/.local/bin/ani-cli
chmod 755 $HOME/.local/bin/ani-cli
curl -fL "https://github.com/dilshod/xlsx2csv/raw/master/xlsx2csv.py" -o $HOME/.local/bin/xlsx2csv.py
chmod 755 $HOME/.local/bin/xlsx2csv.py

View File

@ -1,5 +1,5 @@
TLP_DEFAULT_MODE=BAT
#TLP_PS_IGNORE=BAT
#TLP_PERSISTENT_DEFAULT=1
CPU_SCALING_GOVERNOR_ON_BAT=ondemand
CPU_SCALING_MIN_FREQ_ON_BAT=1400000
@ -9,18 +9,16 @@ CPU_SCALING_MIN_FREQ_ON_AC=1400000
CPU_SCALING_MAX_FREQ_ON_AC=2100000
#DISK_DEVICES="nvme0n1 sda"
DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
DISK_SPINDOWN_TIMEOUT_ON_AC="keep keep"
DISK_SPINDOWN_TIMEOUT_ON_BAT="keep 1"
DISK_IOSCHED="mq-deadline mq-deadline"
PCIE_ASPM_ON_BAT=default
PCIE_ASPM_ON_AC=default
RADEON_POWER_PROFILE_ON_BAT=auto
RADEON_POWER_PROFILE_ON_AC=auto
RADEON_DPM_STATE_ON_BAT=battery
RADEON_DPM_STATE_ON_AC=performance
#RESTORE_DEVICE_STATE_ON_STARTUP=1
DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
#DEVICES_TO_ENABLE_ON_STARTUP="wifi"
DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
START_CHARGE_THRESH_BAT0=70