diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index cd8be66..f28f1ed 100644 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -1,31 +1,51 @@ -window: - opacity: 0.90 - dynamic_padding: true - decorations: none - padding: - x: 1 - y: 1 -# Font Mono configuration (changes require restart) +# Font font: - # Normal (roman) font face normal: - family: Hack Nerd Font Mono + family: Hack Nerd Font style: Regular - # Bold font face bold: - family: Hack Nerd Font Mono + family: Hack Nerd Font style: Bold - # Italic font face italic: - family: Hack Nerd Font Mono + family: Hack Nerd Font style: Italic - # Bold italic font face bold_italic: - family: Hack Nerd Font Mono + family: Hack Nerd Font style: Bold Italic - # Point size - size: 14.0 + size: 11 + +# Gruvbox +colors: + primary: + background: '#282828' + foreground: '#ebdbb2' + + # Normal colors + normal: + black: '#282828' + red: '#cc241d' + green: '#98971a' + yellow: '#d79921' + blue: '#458588' + magenta: '#b16286' + cyan: '#689d6a' + white: '#a89984' + + # Bright colors + bright: + black: '#928374' + red: '#fb4934' + green: '#b8bb26' + yellow: '#fabd2f' + blue: '#83a598' + magenta: '#d3869b' + cyan: '#8ec07c' + white: '#ebdbb2' + +window: + opacity: 0.75 + diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index 4bdf327..649000d 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -99,34 +99,42 @@ local lspconfig = require 'lspconfig' local function config(_config) return vim.tbl_deep_extend("force", { capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()), - on_attach = function() - -- local opts = { noremap = true, silent = true } - nnoremap("gd", function() vim.lsp.buf.definition() end) - nnoremap("gD", function() vim.lsp.buf.declaration() end) - nnoremap("K", function() vim.lsp.buf.hover() end) - nnoremap("vws", function() vim.lsp.buf.workspace_symbol() end) - nnoremap("vd", function() vim.diagnostic.open_float() end) - nnoremap("[d", function() vim.diagnostic.goto_next() end) - nnoremap("]d", function() vim.diagnostic.goto_prev() end) - nnoremap("vca", function() vim.lsp.buf.code_action() end) - nnoremap("vrr", function() vim.lsp.buf.references() end) - nnoremap("vrn", function() vim.lsp.buf.rename() end) - inoremap("", function() vim.lsp.buf.signature_help() end) - --vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - -- vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'lua vim.lsp.buf.signature_help()', opts) - -- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - -- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - -- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - -- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - -- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ca', 'lua vim.lsp.buf.code_action()', opts) - -- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'so', [[lua require('telescope.builtin').lsp_document_symbols()]], opts) - -- vim.cmd [[ command! Format execute 'lua vim.lsp.buf.formatting()' ]] - end, + on_attach = function() + -- local opts = { noremap = true, silent = true } + nnoremap("gd", function() vim.lsp.buf.definition() end) + nnoremap("gD", function() vim.lsp.buf.declaration() end) + nnoremap("K", function() vim.lsp.buf.hover() end) + nnoremap("gW", function() vim.lsp.buf.workspace_symbol() end) + nnoremap("vd", function() vim.diagnostic.open_float() end) + nnoremap("[d", function() vim.diagnostic.goto_next() end) + nnoremap("]d", function() vim.diagnostic.goto_prev() end) + nnoremap("ca", function() vim.lsp.buf.code_action() end) + nnoremap("rr", function() vim.lsp.buf.references() end) + nnoremap("rn", function() vim.lsp.buf.rename() end) + nnoremap("cl", function() vim.lsp.codelens.run() end) + inoremap("", function() vim.lsp.buf.signature_help() end) + --vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', 'lua vim.lsp.buf.implementation()', opts) + -- vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'lua vim.lsp.buf.signature_help()', opts) + -- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) + -- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) + -- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) + -- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'D', 'lua vim.lsp.buf.type_definition()', opts) + -- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ca', 'lua vim.lsp.buf.code_action()', opts) + -- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'so', [[lua require('telescope.builtin').lsp_document_symbols()]], opts) + -- vim.cmd [[ command! Format execute 'lua vim.lsp.buf.formatting()' ]] + end, }, _config or {}) end -lspconfig['elixirls'].setup(config({ - cmd = {"/Users/fbecker18/opt/elixir-ls/language_server.sh"} +local elixir = require('elixir') +elixir.setup(config({ + cmd = {"/home/halfdan/opt/elixir-ls/bin/language_server.sh"}, + settings = elixir.settings({ + dialyzerEnabled = true, + fetchDeps = false, + enableTestLenses = true, + suggestSpecs = false, + }), })) -- Enable the following language servers diff --git a/.config/nvim/after/plugin/treesitter-textobjects.lua b/.config/nvim/after/plugin/treesitter-textobjects.lua new file mode 100644 index 0000000..c8f622b --- /dev/null +++ b/.config/nvim/after/plugin/treesitter-textobjects.lua @@ -0,0 +1,44 @@ +require'nvim-treesitter.configs'.setup { + textobjects = { + select = { + enable = true, + + -- Automatically jump forward to textobj, similar to targets.vim + lookahead = true, + + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + }, + -- You can choose the select mode (default is charwise 'v') + selection_modes = { + ['@parameter.outer'] = 'v', -- charwise + ['@function.outer'] = 'V', -- linewise + ['@class.outer'] = '', -- blockwise + }, + }, + move = { + enable = true, + set_jumps = true, -- whether to set jumps in the jumplist + goto_next_start = { + ["]m"] = "@function.outer", + ["]]"] = "@class.outer", + }, + goto_next_end = { + ["]M"] = "@function.outer", + ["]["] = "@class.outer", + }, + goto_previous_start = { + ["[m"] = "@function.outer", + ["[["] = "@class.outer", + }, + goto_previous_end = { + ["[M"] = "@function.outer", + ["[]"] = "@class.outer", + }, + }, + }, +} diff --git a/.config/nvim/lua/halfdan/packer.lua b/.config/nvim/lua/halfdan/packer.lua index 24b56ac..4ed8125 100644 --- a/.config/nvim/lua/halfdan/packer.lua +++ b/.config/nvim/lua/halfdan/packer.lua @@ -55,6 +55,7 @@ return require("packer").startup( -- Treesitter use {"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"} + use {"nvim-treesitter/nvim-treesitter-textobjects"} use {'preservim/tagbar'} vim.g.tagbar_ctags_bin = '/usr/local/bin/ctags' @@ -116,7 +117,7 @@ return require("packer").startup( -- => Language Support use {'rust-lang/rust.vim'} use {'simrat39/rust-tools.nvim'} - + use({ "mhanberg/elixir.nvim", requires = { "neovim/nvim-lspconfig", "nvim-lua/plenary.nvim" }}) -- use {'JuliaEditorSupport/julia-vim', opt=true} -- vim.g.latex_to_unicode_auto = 1 diff --git a/.config/nvim/lua/halfdan/settings.lua b/.config/nvim/lua/halfdan/settings.lua index 9886a29..c65aac3 100644 --- a/.config/nvim/lua/halfdan/settings.lua +++ b/.config/nvim/lua/halfdan/settings.lua @@ -11,7 +11,7 @@ vim.cmd('set whichwrap+=<,>,[,],h,l') -- move to next line with theses keys vim.cmd('syntax on') -- syntax highlighting vim.o.pumheight = 10 -- Makes popup menu smaller vim.o.fileencoding = "utf-8" -- The encoding written to file -vim.o.cmdheight = 2 -- More space for displaying messages +vim.o.cmdheight = 1 -- More space for displaying messages vim.cmd('set colorcolumn=99999') -- fix indentline for now vim.o.mouse = "a" -- Enable your mouse vim.o.splitbelow = true -- Horizontal splits will automatically be below diff --git a/.config/nvim/lua/halfdan/telescope.lua b/.config/nvim/lua/halfdan/telescope.lua index 6712045..f3d9c90 100644 --- a/.config/nvim/lua/halfdan/telescope.lua +++ b/.config/nvim/lua/halfdan/telescope.lua @@ -16,7 +16,7 @@ require('telescope').setup { layout_strategy = "horizontal", layout_defaults = {horizontal = {mirror = false}, vertical = {mirror = false}}, file_sorter = require'telescope.sorters'.get_fuzzy_file, - file_ignore_patterns = {}, + file_ignore_patterns = {"_build", "node_modules" }, generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter, shorten_path = true, winblend = 0, diff --git a/.config/sway/backgrounds/eclipse.jpg b/.config/sway/backgrounds/eclipse.jpg new file mode 100644 index 0000000..cdbb5cc Binary files /dev/null and b/.config/sway/backgrounds/eclipse.jpg differ diff --git a/.config/sway/config b/.config/sway/config index 40866cb..8ef0ff0 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -84,35 +84,39 @@ bindsym $mod+a focus parent #bindsym $mod+d focus child # switch to workspace -bindsym $mod+1 workspace 1 -bindsym $mod+2 workspace 2 -bindsym $mod+3 workspace 3 -bindsym $mod+4 workspace 4 -bindsym $mod+5 workspace 5 -bindsym $mod+6 workspace 6 -bindsym $mod+7 workspace 7 -bindsym $mod+8 workspace 8 -bindsym $mod+9 workspace 9 -bindsym $mod+0 workspace 10 +bindsym $mod+plus workspace 1 +bindsym $mod+bracketleft workspace 2 +bindsym $mod+braceleft workspace 3 +bindsym $mod+parenleft workspace 4 +bindsym $mod+ampersand workspace 5 +bindsym $mod+equal workspace 6 +bindsym $mod+parenright workspace 7 +bindsym $mod+braceright workspace 8 +bindsym $mod+bracketright workspace 9 +bindsym $mod+asterisk workspace 10 # move focused container to workspace -bindsym $mod+Shift+1 move container to workspace 1 -bindsym $mod+Shift+2 move container to workspace 2 -bindsym $mod+Shift+3 move container to workspace 3 -bindsym $mod+Shift+4 move container to workspace 4 -bindsym $mod+Shift+5 move container to workspace 5 -bindsym $mod+Shift+6 move container to workspace 6 -bindsym $mod+Shift+7 move container to workspace 7 -bindsym $mod+Shift+8 move container to workspace 8 -bindsym $mod+Shift+9 move container to workspace 9 -bindsym $mod+Shift+0 move container to workspace 10 +bindsym $mod+Shift+plus move container to workspace 1 +bindsym $mod+Shift+bracketleft move container to workspace 2 +bindsym $mod+Shift+braceleft move container to workspace 3 +bindsym $mod+Shift+parenleft move container to workspace 4 +bindsym $mod+Shift+ampersand move container to workspace 5 +bindsym $mod+Shift+equal move container to workspace 6 +bindsym $mod+Shift+parenright move container to workspace 7 +bindsym $mod+Shift+braceright move container to workspace 8 +bindsym $mod+Shift+bracketright move container to workspace 9 +bindsym $mod+Shift+asterisk move container to workspace 10 # reload the configuration file bindsym $mod+Shift+c reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) bindsym $mod+Shift+r restart # exit i3 (logs you out of your X session) -# bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" + +# Pulse Audio controls +bindsym XF86AudioRaiseVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5% +bindsym XF86AudioLowerVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5% +bindsym XF86AudioMute exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle# Pulse Audio controls # resize window (you can also use the mouse for that) mode "resize" { @@ -147,5 +151,5 @@ set $status_script ~/.config/sway/status.sh # Suspend bindsym $mod+Shift+period exec systemctl suspend -include ~/.config/sway/config.d/* include /etc/sway/config.d/* +include ~/.config/sway/config.d/* diff --git a/.config/sway/config.d/inputs b/.config/sway/config.d/inputs index 7cd4c66..58ee3bf 100644 --- a/.config/sway/config.d/inputs +++ b/.config/sway/config.d/inputs @@ -1,3 +1,9 @@ input 1452:591:Keychron_Keychron_K2 { - xkb_layout us + xkb_layout real-prog-dvorak + xkb_options caps:escape +} + +input 10730:258:Kinesis_Advantage2_Keyboard { + xkb_layout real-prog-dvorak + xkb_options caps:escape } diff --git a/.config/sway/config.d/outputs b/.config/sway/config.d/outputs index b1af65c..9d8be35 100644 --- a/.config/sway/config.d/outputs +++ b/.config/sway/config.d/outputs @@ -5,3 +5,6 @@ set $curved_small 'Goldstar Company Ltd LG HDR WQHD 0x0000655D' # Resolution output $display_tv mode 1920x1080@30Hz output $curved_small mode 3440x1440@60Hz + +# Wallpapers +output * bg ~/.config/sway/backgrounds/eclipse.jpg stretch diff --git a/.config/waybar/config b/.config/waybar/config index cfb70a5..4ab61dd 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -27,26 +27,26 @@ //], "modules-right": [ - "custom/arrow1", - "custom/alsa", - //"pulseaudio", + //"custom/arrow1", + //"custom/alsa", + "pulseaudio", //"sndio", - "custom/arrow2", + //"custom/arrow2", "network", - "custom/arrow3", + //"custom/arrow3", "memory", - "custom/arrow4", + //"custom/arrow4", "cpu", - "custom/arrow5", + //"custom/arrow5", "temperature", - "custom/arrow6", + //"custom/arrow6", "sway/language", - "custom/arrow7", + //"custom/arrow7", //"battery", //"custom/arrow8", "tray", "clock#date", - "custom/arrow9", + //"custom/arrow9", "clock#time" ],