diff --git a/users/jeroenb/base.sh b/users/jeroenb/base.sh index 72cd8011..84996881 100644 --- a/users/jeroenb/base.sh +++ b/users/jeroenb/base.sh @@ -41,6 +41,10 @@ if have neomutt; then alias m="neomutt" fi +if have bat; then + alias cat="bat" +fi + alias dev="cd $HOME/Work/" alias dropbox="cd $DROPBOX" alias db="cd $DROPBOX" @@ -53,6 +57,7 @@ alias gD="cd $HOME/Desktop" alias gdb="cd $DROPBOX" alias kl="kitty-tmux @ set_color ~/.config/kitty/themes/ayu_light.conf" alias kd="kitty-tmux @ set_color ~/.config/kitty/themes/default.conf" +alias ssh="kitty +kitten ssh" # python 3.8 export PATH="/usr/local/opt/python@3.8/bin:$PATH" diff --git a/users/jeroenb/config/kitty/themes/github.conf b/users/jeroenb/config/kitty/themes/github.conf new file mode 100644 index 00000000..484c06de --- /dev/null +++ b/users/jeroenb/config/kitty/themes/github.conf @@ -0,0 +1,40 @@ +# https://raw.githubusercontent.com/projekt0n/github-nvim-theme/main/extras/kitty_github_dark.conf +# github colors for Kitty + +background #22272e +foreground #768390 +selection_background #264466 +selection_foreground #768390 +url_color #768390 +cursor #6cb6ff + +# Tabs +active_tab_background #6cb6ff +active_tab_foreground #1e2228 +inactive_tab_background #768390 +inactive_tab_foreground #1e2228 +#tab_bar_background #1B1F25 + +# normal +color0 #1B1F25 +color1 #ff938a +color2 #6bc46d +color3 #c69026 +color4 #6cb6ff +color5 #b083f0 +color6 #56d4dd +color7 #636e7b + +# bright +color8 #636e7b +color9 #ff938a +color10 #6bc46d +color11 #daaa3f +color12 #6cb6ff +color13 #dcbdfb +color14 #56d4dd +color15 #768390 + +# extended colors +color16 #daaa3f +color17 #ff938a diff --git a/users/jeroenb/config/nvim/lua/init.lua b/users/jeroenb/config/nvim/lua/init.lua index a0113d6a..4964158a 100644 --- a/users/jeroenb/config/nvim/lua/init.lua +++ b/users/jeroenb/config/nvim/lua/init.lua @@ -47,6 +47,7 @@ paq {'mattn/emmet-vim'} paq {'kana/vim-textobj-user'} paq {'kana/vim-textobj-line'} paq {'andyl/vim-textobj-elixir'} +paq {'elixir-editors/vim-elixir'} -- correct commentstring and other percs paq {'hrsh7th/vim-vsnip'} -- snippets paq {'rafamadriz/friendly-snippets'} -- snippets @@ -63,18 +64,14 @@ paq {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' } paq {'mileszs/ack.vim'} -- paq {'kosayoda/nvim-lightbulb'} -- shows lightbulb in sign column when textDocument/codeAction available at current cursor --- paq {'steelsojka/pears.nvim'} -- Auto Pairs -paq {'terrortylor/nvim-comment'} -- Comment +paq {'steelsojka/pears.nvim'} -- Auto Pairs +paq {'b3nj5m1n/kommentary'} -- Comment --- paq { --- 'lewis6991/gitsigns.nvim', --- requires = {'nvim-lua/plenary.nvim'}, --- config = function() --- require('gitsigns').setup() --- end --- } - -paq{'dracula/vim', as='dracula'} -- Use `as` to alias a package name (here `vim`) +-- Themes +paq {'dracula/vim', as='dracula'} -- Use `as` to alias a package name (here `vim`) +paq {'whatyouhide/vim-gotham'} -- It's the colorscheme we set that defines us. (Batman) +paq {'liuchengxu/space-vim-dark'} +paq {'projekt0n/github-nvim-theme'} ------------------------------------------------- @@ -85,7 +82,7 @@ paq{'dracula/vim', as='dracula'} -- Use `as` to alias a pac -- Basic settings local indent = 2 -cmd 'colorscheme dracula' -- Put your favorite colorscheme here +-- cmd 'colorscheme gotham' -- Put your favorite colorscheme here opt('o', 'splitbelow', true) -- Put new windows below current opt('o', 'splitright', true) -- Put new windows right of current @@ -106,7 +103,7 @@ opt('b', 'tabstop', indent) -- Number of spaces tabs c opt('b', 'shiftwidth', indent) -- Size of an indent opt('o', 'shiftround', true) -- Round indent opt('b', 'expandtab', true) -- Use spaces instead of tabs -opt('w', 'wrap', false) +opt('w', 'wrap', true) opt('w', 'lbr', true) -- Wrap long lines at a character in 'breakat' rather than last character that fits screen opt('b', 'smartindent', true) -- Insert indents automatically @@ -197,7 +194,7 @@ map('n', 'S', 'mzi`z') -- Split line and preserve -- -- map('i', '', 'pumvisible() ? "\\" : "\\"', {expr = true}) -- -- map('i', '', 'pumvisible() ? "\\" : "\\"', {expr = true}) -cmd 'au BufNewFile,BufRead *.ex,*.exs,*.eex,*.leex set filetype=elixir' +--cmd 'au BufNewFile,BufRead *.ex,*.exs,*.eex,*.leex set filetype=elixir' cmd 'autocmd BufWritePost *.exs,*.ex silent :!source .env && mix format --check-equivalent %' @@ -205,6 +202,10 @@ cmd 'autocmd BufWritePost *.exs,*.ex silent :!source .env && mix format --check- -- PLUGINS SETUP ------------------------------------------------- +-- colorscheme +require('github-theme').setup({ + themeStyle = "dimmed", +}) -- webdev icons require('nvim-web-devicons').setup() @@ -215,7 +216,7 @@ g.ackprg = 'rg --vimgrep' -- cnoreabbrev ack Ack! -- nvim-tree -g.nvim_tree_auto_open = 1 +g.nvim_tree_auto_open = 0 g.nvim_tree_auto_close = 1 g.nvim_tree_width_allow_resize = 1 g.nvim_tree_hide_dotfiles = 1 @@ -228,7 +229,11 @@ map('n', 'R', 'NvimTreeRefresh') map('n', 'gs', 'Git') -- lualine -require('lualine').setup() +require('lualine').setup({ + options = { + theme = "github" + } +}) -- Bufferline -- require('bufferline').setup { @@ -242,6 +247,36 @@ require('lualine').setup() -- Check to extend: https://github.com/varbhat/dotfiles/blob/main/dot_config/nvim/lua/utils/telescope.lua map('n', '', 'Telescope find_files') map('n', 'fg', 'Telescope live_grep') +map('n', 'fb', 'Telescope file_browser') +map('n', 'gb', 'Telescope git_branches') +map('n', 'gc', 'Telescope git_commits') +map('n', 'gg', 'Telescope git_status') + +local previewers = require('telescope.previewers') + +-- TODO: +-- for now, telescope has serious hickups showing the coloured preview +-- it improved by disabling it for some filetypes, but I got the best results +-- disabling it alltogehter. I don't care about coloured previews. +-- Check in the future if it has improved. +-- local _bad = { '.*%.json', '.*%.lua', '.*%.ex', '*.%.eex', '.*%.exs', '.*%.leex', '' } -- Put all filetypes that slow you down in this array +-- local bad_files = function(filepath) +-- for _, v in ipairs(_bad) do +-- if filepath:match(v) then +-- return false +-- end +-- end +-- +-- return true +-- end + +local new_maker = function(filepath, bufnr, opts) + opts = opts or {} + if opts.use_ft_detect == nil then opts.use_ft_detect = true end + -- opts.use_ft_detect = opts.use_ft_detect == false and false or bad_files(filepath) + opts.use_ft_detect = false + previewers.buffer_previewer_maker(filepath, bufnr, opts) +end require('telescope').setup { defaults = { @@ -254,7 +289,8 @@ require('telescope').setup { '--line-number', '--column', '--smart-case' - } + }, + buffer_previewer_maker = new_maker, }, extensions = { fzf = { @@ -269,11 +305,16 @@ require('telescope').setup { -- load_extension, somewhere after setup function: require('telescope').load_extension('fzf') --- Comment -require('nvim_comment').setup() +require('telescope').setup { + defaults = { + buffer_previewer_maker = new_maker, + } +} + +-- cmd [[autocmd CursorHold,CursorHoldI * lua require'nvim-lightbulb'.update_lightbulb()]] -- Auto pairs --- require('pears').setup() +require('pears').setup() -- Emmet g.use_emmet_complete_tag = 1 @@ -341,7 +382,7 @@ require("compe").setup { autocomplete = true, debug = true, min_length = 1, - preselect = "always", + preselect = "disable", throttle_time = 8000, source_timeout = 2000, incomplete_delay = 4000, @@ -351,11 +392,11 @@ require("compe").setup { documentation = true, source = { - buffer = true, + buffer = { priority = 500}, calc = false, - nvim_lsp = true, + nvim_lsp = { priority = 800 }, nvim_lua = false, - path = true, + path = { priority = 600 }, spell = false, vsnip = { priority = 1000; } } @@ -425,6 +466,7 @@ local nvim_lsp = require('lspconfig') -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) + print "map keys" 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 @@ -506,17 +548,17 @@ capabilities.textDocument.codeAction = { -- Snippets capabilities.textDocument.completion.completionItem.snippetSupport = true; --- Use a loop to conveniently call 'setup' on multiple servers and --- map buffer local keybindings when the language server attaches -local servers = { "elixirls", "tsserver" } -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup { on_attach = on_attach, capabilities = capabilities } -end - nvim_lsp.elixirls.setup({ + on_attach = on_attach, + capabilities = capabilities, cmd = { "/usr/local/share/elixir-ls/language_server.sh" }, }) +nvim_lsp.tsserver.setup({ + on_attach = on_attach, + capabilities = capabilities +}) + -- local lspfuzzy = require 'lspfuzzy' -- -- lspfuzzy.setup {} -- Make the LSP client use FZF instead of the quickfix list diff --git a/users/jeroenb/config/weechat/alias.conf b/users/jeroenb/config/weechat/alias.conf index 0a02da3b..9fcd7e0d 100644 --- a/users/jeroenb/config/weechat/alias.conf +++ b/users/jeroenb/config/weechat/alias.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # diff --git a/users/jeroenb/config/weechat/buflist.conf b/users/jeroenb/config/weechat/buflist.conf index 552bd440..91b7376d 100644 --- a/users/jeroenb/config/weechat/buflist.conf +++ b/users/jeroenb/config/weechat/buflist.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # @@ -38,3 +38,4 @@ lag = " ${color:yellow}[${color:blue}${lag}${color:green}]" name = "${name}" nick_prefix = "${color_nick_prefix}${nick_prefix}" number = "${color:27}${number}${if:${number_displayed}?.: }" +tls_version = " ${color:default}(${if:${tls_version}==TLS1.3?${color:green}:${if:${tls_version}==TLS1.2?${color:yellow}:${color:red}}}${translate:${tls_version}}${color:default})" diff --git a/users/jeroenb/config/weechat/charset.conf b/users/jeroenb/config/weechat/charset.conf index 00d304cd..3fed54d5 100644 --- a/users/jeroenb/config/weechat/charset.conf +++ b/users/jeroenb/config/weechat/charset.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # diff --git a/users/jeroenb/config/weechat/exec.conf b/users/jeroenb/config/weechat/exec.conf index 9e1b4f1e..b3c0ee0d 100644 --- a/users/jeroenb/config/weechat/exec.conf +++ b/users/jeroenb/config/weechat/exec.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # diff --git a/users/jeroenb/config/weechat/fset.conf b/users/jeroenb/config/weechat/fset.conf index 53b0da7e..3d7a8140 100644 --- a/users/jeroenb/config/weechat/fset.conf +++ b/users/jeroenb/config/weechat/fset.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # diff --git a/users/jeroenb/config/weechat/irc.conf b/users/jeroenb/config/weechat/irc.conf index 46a74bd6..d17a056b 100644 --- a/users/jeroenb/config/weechat/irc.conf +++ b/users/jeroenb/config/weechat/irc.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # @@ -75,6 +75,9 @@ item_channel_modes = default item_lag_counting = default item_lag_finished = yellow item_nick_modes = default +item_tls_version_deprecated = yellow +item_tls_version_insecure = red +item_tls_version_ok = green message_account = cyan message_chghost = brown message_join = green diff --git a/users/jeroenb/config/weechat/logger.conf b/users/jeroenb/config/weechat/logger.conf index d0d3218d..54aadfdd 100644 --- a/users/jeroenb/config/weechat/logger.conf +++ b/users/jeroenb/config/weechat/logger.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # diff --git a/users/jeroenb/config/weechat/plugins.conf b/users/jeroenb/config/weechat/plugins.conf index 168542e9..ab892021 100644 --- a/users/jeroenb/config/weechat/plugins.conf +++ b/users/jeroenb/config/weechat/plugins.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # diff --git a/users/jeroenb/config/weechat/python.conf b/users/jeroenb/config/weechat/python.conf index 187b778d..febee01e 100644 --- a/users/jeroenb/config/weechat/python.conf +++ b/users/jeroenb/config/weechat/python.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # diff --git a/users/jeroenb/config/weechat/relay.conf b/users/jeroenb/config/weechat/relay.conf index 341b8112..a0337aa9 100644 --- a/users/jeroenb/config/weechat/relay.conf +++ b/users/jeroenb/config/weechat/relay.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # diff --git a/users/jeroenb/config/weechat/ruby.conf b/users/jeroenb/config/weechat/ruby.conf index f6de7fbf..cf78cf88 100644 --- a/users/jeroenb/config/weechat/ruby.conf +++ b/users/jeroenb/config/weechat/ruby.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # diff --git a/users/jeroenb/config/weechat/script.conf b/users/jeroenb/config/weechat/script.conf index 655eb36d..6453fc34 100644 --- a/users/jeroenb/config/weechat/script.conf +++ b/users/jeroenb/config/weechat/script.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # diff --git a/users/jeroenb/config/weechat/sec.conf b/users/jeroenb/config/weechat/sec.conf index 0761dc3b..10b7c949 100644 --- a/users/jeroenb/config/weechat/sec.conf +++ b/users/jeroenb/config/weechat/sec.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # @@ -17,4 +17,4 @@ salt = on [data] __passphrase__ = on -slack_token = "F49D7B63045F969057EAFA818E97D59B64DBED8FD878FA05B99B4BA51182237D6972856C627F3D45CF7E81636C53C72C714B60BD5DFA92BA2E2E6489902E6CB194750D943FA705D15BCB9997026025CFFAFA120E95A86F739B6F6BA7F2DBE3D88CE218D8C94F3B874E0FE4B687393A0781B9" +slack_token = "F7D38BF4FF459F451DF6B0B160AC6C47784C7FB03712398D001BA07EAF99913C3B8340B5DA162E9F67CD25713B5D9DC6931EFFA1DCDC7ABECEF896C0FAA860270B33601285A787D4F5026452A58467BE7FBD9973257914ABDB2C8A4987640D57D260F7556065CEC0F34EEE817951A77CE68B" diff --git a/users/jeroenb/config/weechat/spell.conf b/users/jeroenb/config/weechat/spell.conf index f65348de..eebb2a68 100644 --- a/users/jeroenb/config/weechat/spell.conf +++ b/users/jeroenb/config/weechat/spell.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # diff --git a/users/jeroenb/config/weechat/trigger.conf b/users/jeroenb/config/weechat/trigger.conf index 24246667..3ce89f60 100644 --- a/users/jeroenb/config/weechat/trigger.conf +++ b/users/jeroenb/config/weechat/trigger.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # diff --git a/users/jeroenb/config/weechat/weechat.conf b/users/jeroenb/config/weechat/weechat.conf index ad2ebbdd..415efcdb 100644 --- a/users/jeroenb/config/weechat/weechat.conf +++ b/users/jeroenb/config/weechat/weechat.conf @@ -4,7 +4,7 @@ # WARNING: It is NOT recommended to edit this file by hand, # especially if WeeChat is running. # -# Use /set or similar command to change settings in WeeChat. +# Use commands like /set or /fset to change settings in WeeChat. # # For more info, see: https://weechat.org/doc/quickstart # @@ -236,7 +236,8 @@ max_visited_buffers = 50 [network] connection_timeout = 60 -gnutls_ca_file = "/usr/local/etc/openssl/cert.pem" +gnutls_ca_system = on +gnutls_ca_user = "" gnutls_handshake_timeout = 30 proxy_curl = "" @@ -247,6 +248,13 @@ extension = ".so,.dll" path = "%h/plugins" save_config_on_unload = on +[signal] +sighup = "${if:${info:weechat_headless}?/reload:/quit -yes}" +sigquit = "/quit -yes" +sigterm = "/quit -yes" +sigusr1 = "" +sigusr2 = "" + [bar] buflist.color_bg = 1011 buflist.color_bg_inactive = default