Skip to content

Commit

Permalink
chore: merge
Browse files Browse the repository at this point in the history
  • Loading branch information
pierot committed Aug 31, 2021
2 parents 2fd83da + 387fb7c commit f78e110
Show file tree
Hide file tree
Showing 19 changed files with 148 additions and 49 deletions.
5 changes: 5 additions & 0 deletions users/jeroenb/base.sh
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
40 changes: 40 additions & 0 deletions 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
104 changes: 73 additions & 31 deletions users/jeroenb/config/nvim/lua/init.lua
Expand Up @@ -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
Expand All @@ -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'}


-------------------------------------------------
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -197,14 +194,18 @@ map('n', 'S', 'mzi<CR><ESC>`z') -- Split line and preserve
-- -- map('i', '<S-Tab>', 'pumvisible() ? "\\<C-p>" : "\\<Tab>"', {expr = true})
-- -- map('i', '<Tab>', 'pumvisible() ? "\\<C-n>" : "\\<Tab>"', {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 %'


-------------------------------------------------
-- PLUGINS SETUP
-------------------------------------------------

-- colorscheme
require('github-theme').setup({
themeStyle = "dimmed",
})

-- webdev icons
require('nvim-web-devicons').setup()
Expand All @@ -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
Expand All @@ -228,7 +229,11 @@ map('n', 'R', '<cmd>NvimTreeRefresh<CR>')
map('n', '<leader>gs', '<cmd>Git<CR>')

-- lualine
require('lualine').setup()
require('lualine').setup({
options = {
theme = "github"
}
})

-- Bufferline
-- require('bufferline').setup {
Expand All @@ -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', '<c-p>', '<cmd>Telescope find_files<CR>')
map('n', '<leader>fg', '<cmd>Telescope live_grep<CR>')
map('n', '<leader>fb', '<cmd>Telescope file_browser<CR>')
map('n', '<leader>gb', '<cmd>Telescope git_branches<CR>')
map('n', '<leader>gc', '<cmd>Telescope git_commits<CR>')
map('n', '<leader>gg', '<cmd>Telescope git_status<CR>')

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 = {
Expand All @@ -254,7 +289,8 @@ require('telescope').setup {
'--line-number',
'--column',
'--smart-case'
}
},
buffer_previewer_maker = new_maker,
},
extensions = {
fzf = {
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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; }
}
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion users/jeroenb/config/weechat/alias.conf
Expand Up @@ -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
#
Expand Down
3 changes: 2 additions & 1 deletion users/jeroenb/config/weechat/buflist.conf
Expand Up @@ -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
#
Expand Down Expand Up @@ -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})"
2 changes: 1 addition & 1 deletion users/jeroenb/config/weechat/charset.conf
Expand Up @@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion users/jeroenb/config/weechat/exec.conf
Expand Up @@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion users/jeroenb/config/weechat/fset.conf
Expand Up @@ -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
#
Expand Down
5 changes: 4 additions & 1 deletion users/jeroenb/config/weechat/irc.conf
Expand Up @@ -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
#
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion users/jeroenb/config/weechat/logger.conf
Expand Up @@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion users/jeroenb/config/weechat/plugins.conf
Expand Up @@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion users/jeroenb/config/weechat/python.conf
Expand Up @@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion users/jeroenb/config/weechat/relay.conf
Expand Up @@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion users/jeroenb/config/weechat/ruby.conf
Expand Up @@ -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
#
Expand Down

0 comments on commit f78e110

Please sign in to comment.