From 98d6570a08449834a2c19b19dacb6d61cbe43565 Mon Sep 17 00:00:00 2001 From: cmccay Date: Sat, 12 Nov 2022 15:19:55 -0600 Subject: [PATCH 1/9] lsp and nvim stuff --- alacritty/.config/alacritty/alacritty.config | 2 +- alacritty/.config/alacritty/alacritty.yml | 5 +- i3/.config/i3/config | 148 ------------- i3/.config/i3/scratchpads.conf | 17 -- i3/.config/i3/themes/current.conf | 20 -- i3/.config/i3/workspaces.conf | 45 ---- i3blocks/.config/i3blocks/config | 40 ---- i3status/.config/i3status/config | 53 ----- nvim/.config/nvim/ftplugin/python.lua | 11 + nvim/.config/nvim/init.lua | 15 ++ nvim/.config/nvim/lua/completion.lua | 57 +++++ nvim/.config/nvim/lua/keybindings.lua | 9 + nvim/.config/nvim/lua/lsp.lua | 59 +++++ nvim/.config/nvim/lua/plugins.lua | 36 ++- nvim/.config/nvim/lua/settings.lua | 6 +- nvim/.config/nvim/plugin/packer_compiled.lua | 219 +++++++++++++++++++ tmux/.config/tmux/statusline.conf | 15 +- tmux/.config/tmux/tmux.conf | 8 +- 18 files changed, 422 insertions(+), 343 deletions(-) delete mode 100644 i3/.config/i3/config delete mode 100644 i3/.config/i3/scratchpads.conf delete mode 100644 i3/.config/i3/themes/current.conf delete mode 100644 i3/.config/i3/workspaces.conf delete mode 100644 i3blocks/.config/i3blocks/config delete mode 100644 i3status/.config/i3status/config create mode 100644 nvim/.config/nvim/lua/completion.lua create mode 100644 nvim/.config/nvim/plugin/packer_compiled.lua diff --git a/alacritty/.config/alacritty/alacritty.config b/alacritty/.config/alacritty/alacritty.config index 31e0ce2..ad3e9b0 100644 --- a/alacritty/.config/alacritty/alacritty.config +++ b/alacritty/.config/alacritty/alacritty.config @@ -1 +1 @@ -background_opacity: 1.0 +background_opacity: 0.5 diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index 705396d..d2a8348 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -1,9 +1,10 @@ window: - opacity: 0.85 + opacity: 0.8 font: + size: 14 normal: - family: monospace + family: FiraMono Nerd Font style: Regular # Colors (Oxide) diff --git a/i3/.config/i3/config b/i3/.config/i3/config deleted file mode 100644 index 2aab87a..0000000 --- a/i3/.config/i3/config +++ /dev/null @@ -1,148 +0,0 @@ -###################################### -# Includes -###################################### - -include $HOME/.config/i3/workspaces.conf -include $HOME/.config/i3/scratchpads.conf -include $HOME/.config/i3/themes/current.conf - -###################################### -# Basic Set up -###################################### - -set $mod Mod4 -floating_modifier $mod -font pango:monospace 8 - -# Start XDG autostart .desktop files using dex. See also -# https://wiki.archlinux.org/index.php/XDG_Autostart -exec --no-startup-id dex --autostart --environment i3 - -# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the -# screen before suspend. Use loginctl lock-session to lock your screen. -exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork - -# Use pactl to adjust volume in PulseAudio. -set $refresh_i3status killall -SIGUSR1 i3status -bindsym F11 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status -bindsym F10 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status -bindsym F9 exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status - -# Fix monitor setup on bootup -exec ~/scripts/xrandr_dual_monitor.sh - -# turn picom on on start up -exec_always --no-startup-id picom & - -# turn off borders (required for i3-gaps) -for_window [class=".*"] border pixel 2 - -# gaps -gaps inner 12 - -# polybar -exec_always --no-startup-id $HOME/.config/polybar/launch.sh - -# set background on startup -set $wallpaper /home/clint/Pictures/wallpapers/_current_wallpaper.jpg -exec --no-startup-id feh --bg-fill $wallpaper - - -###################################### -# Key Bindings -###################################### - -# start a terminal -bindsym $mod+Return exec --no-startup-id alacritty - -# kill focused window -bindsym $mod+Shift+q kill -bindsym $mod+q kill - -# start dmenu (a program launcher) -bindsym $mod+d exec --no-startup-id rofi -show run - -# you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# split in horizontal orientation -bindsym $mod+h split h - -# split in vertical orientation -bindsym $mod+v split v - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# focus the parent container -bindsym $mod+a focus parent - -# lock screen -bindsym $mod+l exec ~/scripts/lock.sh - -# dmenu stuff -bindsym $mod+c exec ~/scripts/dmenu_configs.sh -bindsym $mod+p exec ~/scripts/dmenu_images.sh -bindsym $mod+x exec ~/scripts/dmenu_shutdown.sh - -# common programs -bindsym $mod+Shift+w exec firefox -bindsym $mod+Shift+p exec pycharm - -# 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'" - -# Volume controls -#bindsym F9 exec pactl set-sink-mute @DEFAULT_SINK@ toggle -#bindsym F11 exec pactl set-sink-volume 0 +10% -#bindsym F10 exec pactl set-sink-volume 0 -10% - -# set which programs open in which workspaces -# to find the class, run xprop in a terminal and click on a program -#assign [class="firefox"] $ws2 - -# these programs will float -for_window [class="kcalc"] floating enable - -###################################### -# Resizing Windows -###################################### - -bindsym $mod+r mode "resize" - -mode "resize" { - bindsym j resize shrink width 10 px or 10 ppt - bindsym k resize grow height 10 px or 10 ppt - bindsym l resize shrink height 10 px or 10 ppt - bindsym semicolon resize grow width 10 px or 10 ppt - - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape or $mod+r - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" -} - diff --git a/i3/.config/i3/scratchpads.conf b/i3/.config/i3/scratchpads.conf deleted file mode 100644 index eb30699..0000000 --- a/i3/.config/i3/scratchpads.conf +++ /dev/null @@ -1,17 +0,0 @@ -# Calculator -exec --no-startup-id kcalc -for_window [class="kcalc"] , move scratchpad -bindsym $mod+g [class="kcalc"] scratchpad show - -# Task Manager -exec_always --no-startup-id pgrep -f '^alacritty -t TaskManager --class taskman,taskman' || alacritty -t TaskManager --class taskman,taskman -e btm -for_window [class="taskman"] , move scratchpad -bindsym $mod+F1 [class="taskman"] scratchpad show - -# Pacman Updates - used in Polybar -for_window [class="update"] , move window to scratchpad, scratchpad show - -# Spotify -exec_always --no-startup-id pgrep -f '^alacritty -t Spotify --class spotify,spotify' || alacritty -t Spotify --class spotify,spotify -e spt -for_window [class="spotify"] , move scratchpad -bindsym $mod+m [class="spotify"] scratchpad show diff --git a/i3/.config/i3/themes/current.conf b/i3/.config/i3/themes/current.conf deleted file mode 100644 index 9b011f3..0000000 --- a/i3/.config/i3/themes/current.conf +++ /dev/null @@ -1,20 +0,0 @@ -# messin with colors -#set $bd-color #1de071 -#set $bd-indicator #d42069 - -set $bd-color #76b5c5 -set $bd-indicator #ffffff - -# colorclass border bg text indicator child_border -client.focused $bd-color #111111 #ffffff $bd-indicator $bd-color -client.focused_inactive $bd-color #111111 #ffffff #333333 #111111 -client.unfocused $bd-color #111111 #ffffff #333333 #333333 - -# bar color definitions -set $bar-text #ADF1D2 -set $bar-background #231c1c -set $bar-statusline #eeeeee -set $bar-separator #eeeeee -set $bar-focused_workspace #553555 - - diff --git a/i3/.config/i3/workspaces.conf b/i3/.config/i3/workspaces.conf deleted file mode 100644 index ed3807f..0000000 --- a/i3/.config/i3/workspaces.conf +++ /dev/null @@ -1,45 +0,0 @@ -# i3 workspace conf - -set $ws1 "1" -set $ws2 "2" -set $ws3 "3" -set $ws4 "4" -set $ws5 "5" -set $ws6 "6" -set $ws7 "7" -set $ws8 "8" -set $ws9 "9" -set $ws10 "0" - -# switch to workspace -bindsym $mod+1 workspace number $ws1 -bindsym $mod+2 workspace number $ws2 -bindsym $mod+3 workspace number $ws3 -bindsym $mod+4 workspace number $ws4 -bindsym $mod+5 workspace number $ws5 -bindsym $mod+6 workspace number $ws6 -bindsym $mod+7 workspace number $ws7 -bindsym $mod+8 workspace number $ws8 -bindsym $mod+9 workspace number $ws9 -bindsym $mod+0 workspace number $ws10 - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace number $ws1 -bindsym $mod+Shift+2 move container to workspace number $ws2 -bindsym $mod+Shift+3 move container to workspace number $ws3 -bindsym $mod+Shift+4 move container to workspace number $ws4 -bindsym $mod+Shift+5 move container to workspace number $ws5 -bindsym $mod+Shift+6 move container to workspace number $ws6 -bindsym $mod+Shift+7 move container to workspace number $ws7 -bindsym $mod+Shift+8 move container to workspace number $ws8 -bindsym $mod+Shift+9 move container to workspace number $ws9 -bindsym $mod+Shift+0 move container to workspace number $ws10 - -# tryin some stuff, not sure if this is what i want -workspace $ws1 output HDMI-0 -workspace $ws2 output HDMI-1 -workspace $ws3 output HDMI-0 -workspace $ws4 output HDMI-1 - -# Programs default workspace -assign [class="firefox"] $ws2 diff --git a/i3blocks/.config/i3blocks/config b/i3blocks/.config/i3blocks/config deleted file mode 100644 index 844d591..0000000 --- a/i3blocks/.config/i3blocks/config +++ /dev/null @@ -1,40 +0,0 @@ -[pacman] -command=~/.scripts/i3_pacman.sh -interval=3600 - -[spotifyd] -command=ps aux | grep spotifyd | wc -l -interval=5 - -[finance] -command=~/.scripts/i3_finance.sh -interval=3000 -color=#00b7ff - -[cpu] -command=~/.scripts/i3_cpu.sh -interval=3600 -color=#A4C2F4 - -[mem] -command=~/.scripts/i3_mem.sh -interval=3600 -color=#A4C2F4 - -[ip] -command=~/.scripts/i3_ip.sh -interval=once -color=#91E78B - -[wifi] -command=~/.scripts/i3_wifi.sh -interval=3600 - -[weather] -command=~/.scripts/i3_weather.sh -interval=3600 -color=#C9E42E - -[time] -command=~/.scripts/i3_cal.sh -interval=5 diff --git a/i3status/.config/i3status/config b/i3status/.config/i3status/config deleted file mode 100644 index cf185ec..0000000 --- a/i3status/.config/i3status/config +++ /dev/null @@ -1,53 +0,0 @@ -# i3status configuration file. -# see "man i3status" for documentation. - -# It is important that this file is edited as UTF-8. -# The following line should contain a sharp s: -# ß -# If the above line is not correctly displayed, fix your editor first! - -general { - colors = false - interval = 5 -} - -#order += "ipv6" -order += "wireless _first_" -#order += "ethernet _first_" -#order += "battery all" -#order += "disk /" -#order += "load" -order += "memory" -order += "tztime local" - -wireless _first_ { - format_up = "W:%quality at %essid %ip" - format_down = "W: down" -} - -ethernet _first_ { - format_up = "E: %ip (%speed)" - format_down = "E: down" -} - -battery all { - format = "%status %percentage %remaining" -} - -disk "/" { - format = "%avail" -} - -load { - format = "%1min" -} - -memory { - format = "%used | %available" - threshold_degraded = "1G" - format_degraded = "MEMORY < %available" -} - -tztime local { - format = "%A %b %d, %Y %I:%M:%S%p " - diff --git a/nvim/.config/nvim/ftplugin/python.lua b/nvim/.config/nvim/ftplugin/python.lua index d461f16..0a6e796 100644 --- a/nvim/.config/nvim/ftplugin/python.lua +++ b/nvim/.config/nvim/ftplugin/python.lua @@ -2,6 +2,7 @@ local keymap = vim.api.nvim_set_keymap local default_ops = { noremap = true, silent = true } local settings = vim.opt +vim.g.mapleader = '\\' -- Set up settings.colorcolumn = "80" @@ -12,3 +13,13 @@ keymap('n', '', ":w:exec '!clear;python' shellescape(@%, 1)", defaul -- Handy stuff keymap('n', 'm', 'iif __name__ == "__main__":omain()o', default_ops) -- keymap('n', 'f', 'idef ():bi', default_ops) + +-- Comment/Uncomment +keymap('n', '\\', '0i# ', default_ops) +keymap('n', '-', '0xx', default_ops) +keymap('v', '\\', 'kI# ', default_ops) +keymap('v', '-', 'klx', default_ops) + +-- Indenting +keymap('v', '<', '', '>gv', default_ops) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index e9834bd..3aaa95f 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -3,3 +3,18 @@ require("keybindings") require("settings") require("colorscheme") require("lsp") + +-- todo: move this to plugins.lua +require("telescope").setup{ + defaults = { + prompt_prefix = "$ ", + mappings = { + i = { + ["C-a"] = function() print("asdf") end + } + } + } +} + +require("telescope").load_extension("fzf") +require("telescope").load_extension("file_browser") diff --git a/nvim/.config/nvim/lua/completion.lua b/nvim/.config/nvim/lua/completion.lua new file mode 100644 index 0000000..cd04840 --- /dev/null +++ b/nvim/.config/nvim/lua/completion.lua @@ -0,0 +1,57 @@ +local cmp = require'cmp' +local capabilities = require('cmp_nvim_lsp').default_capabilities() + + cmp.setup({ + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. + require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + end, + }, + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'luasnip' }, -- For luasnip users. + }, { + { name = 'buffer' }, + }) + }) + + -- Set configuration for specific filetype. + cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. + }, { + { name = 'buffer' }, + }) + }) + + -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } + }) + + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }) + }) + diff --git a/nvim/.config/nvim/lua/keybindings.lua b/nvim/.config/nvim/lua/keybindings.lua index 231e95e..d1dee0d 100644 --- a/nvim/.config/nvim/lua/keybindings.lua +++ b/nvim/.config/nvim/lua/keybindings.lua @@ -1,3 +1,7 @@ +-- Generic Keybindings for all files +-- +-- + local keymap = vim.api.nvim_set_keymap local default_ops = { noremap = true, silent = true } @@ -20,3 +24,8 @@ keymap('n', '', 'za', default_ops) -- NERDTree stuff keymap('n', '', ':NERDTreeToggle', default_ops) +-- Telescope stuff +keymap('n', 'ff', ':Telescope find_files hidden=true', default_ops) +keymap('n', 'gf', ':Telescope git_files', default_ops) +keymap('n', 'lg', ':Telescope live_grep', default_ops) +keymap('n', 'd', ':Telescope diagnostics', default_ops) diff --git a/nvim/.config/nvim/lua/lsp.lua b/nvim/.config/nvim/lua/lsp.lua index 2c9dbc9..c58146f 100644 --- a/nvim/.config/nvim/lua/lsp.lua +++ b/nvim/.config/nvim/lua/lsp.lua @@ -1,7 +1,66 @@ +local cmp = require'cmp' +local capabilities = require('cmp_nvim_lsp').default_capabilities() + require'lspconfig'.jedi_language_server.setup{ on_attach = function() vim.keymap.set("n", "K", vim.lsp.buf.hover, {buffer=0}) vim.keymap.set("n", "gd", vim.lsp.buf.definition, {buffer=0}) + vim.keymap.set("n", "r", vim.lsp.buf.rename, {buffer=0}) end } + + cmp.setup({ + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. + require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + end, + }, + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'luasnip' }, -- For luasnip users. + }, { + { name = 'buffer' }, + }) + }) + + -- Set configuration for specific filetype. + cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. + }, { + { name = 'buffer' }, + }) + }) + + -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } + }) + + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }) + }) + diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index a2eac90..1f0997d 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -18,6 +18,10 @@ return require('packer').startup(function(use) -- airline use('vim-airline/vim-airline') + use('vim-airline/vim-airline-themes') + + -- Git + use('tpope/vim-fugitive') -- NerdTree stuff use('preservim/nerdtree') @@ -28,23 +32,35 @@ return require('packer').startup(function(use) use('ervandew/supertab') -- Auto-Complete - use('ncm2/ncm2') - use('roxma/nvim-yarp') - -- enable ncm2 for all buffers - -- autocmd BufEnter * call ncm2#enable_for_buffer() - -- IMPORTANT: :help Ncm2PopupOpen for more information - -- set completeopt=noinsert,menuone,noselect - use('ncm2/ncm2-bufword') -- Basic completion - use('ncm2/ncm2-path') -- Path completion - use('ncm2/ncm2-jedi') -- Python completion +-- use('ncm2/ncm2') +-- use('roxma/nvim-yarp') +-- -- enable ncm2 for all buffers +-- -- autocmd BufEnter * call ncm2#enable_for_buffer() +-- -- IMPORTANT: :help Ncm2PopupOpen for more information +-- -- set completeopt=noinsert,menuone,noselect +-- use('ncm2/ncm2-bufword') -- Basic completion +-- use('ncm2/ncm2-path') -- Path completion +-- use('ncm2/ncm2-jedi') -- Python completion + -- better auto complete maybe + use('hrsh7th/cmp-nvim-lsp') + use('hrsh7th/cmp-nvim-lua') + use('hrsh7th/cmp-buffer') + use('hrsh7th/cmp-path') + use('hrsh7th/nvim-cmp') + use('saadparwaiz1/cmp_luasnip') -- Slime, for tmux repl-ing use('jpalardy/vim-slime') -- Telescope, fuzzy finding use('nvim-lua/plenary.nvim') use('nvim-telescope/telescope.nvim') + use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' } + use( "nvim-telescope/telescope-file-browser.nvim") -- Treesitter - use('nvim-treesitter/nvim-treesitter') + -- use('nvim-treesitter/nvim-treesitter') + + -- Devicons + use('kyazdani42/nvim-web-devicons') end) diff --git a/nvim/.config/nvim/lua/settings.lua b/nvim/.config/nvim/lua/settings.lua index c9480a0..e526e2d 100644 --- a/nvim/.config/nvim/lua/settings.lua +++ b/nvim/.config/nvim/lua/settings.lua @@ -14,7 +14,7 @@ settings.shiftwidth = 4 settings.softtabstop = 4 settings.autoindent = true settings.smartindent = true -settings.colorcolumn = "80" +-- settings.colorcolumn = "80" -- Folding settings.foldmethod = "indent" @@ -27,3 +27,7 @@ vim.g.slime_default_config = { socket_name = vim.api.nvim_eval('get(split($TMUX, ","), 0)'), target_pane = '{bottom}', } + +-- Airline +vim.g.airline_powerline_fonts = 1 +vim.g.airline_extensions_tabline_enabled = 1 diff --git a/nvim/.config/nvim/plugin/packer_compiled.lua b/nvim/.config/nvim/plugin/packer_compiled.lua new file mode 100644 index 0000000..4e107fa --- /dev/null +++ b/nvim/.config/nvim/plugin/packer_compiled.lua @@ -0,0 +1,219 @@ +-- Automatically generated packer.nvim plugin loader code + +if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then + vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') + return +end + +vim.api.nvim_command('packadd packer.nvim') + +local no_errors, error_msg = pcall(function() + +_G._packer = _G._packer or {} +_G._packer.inside_compile = true + +local time +local profile_info +local should_profile = false +if should_profile then + local hrtime = vim.loop.hrtime + profile_info = {} + time = function(chunk, start) + if start then + profile_info[chunk] = hrtime() + else + profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 + end + end +else + time = function(chunk, start) end +end + +local function save_profiles(threshold) + local sorted_times = {} + for chunk_name, time_taken in pairs(profile_info) do + sorted_times[#sorted_times + 1] = {chunk_name, time_taken} + end + table.sort(sorted_times, function(a, b) return a[2] > b[2] end) + local results = {} + for i, elem in ipairs(sorted_times) do + if not threshold or threshold and elem[2] > threshold then + results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' + end + end + if threshold then + table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') + end + + _G._packer.profile_output = results +end + +time([[Luarocks path setup]], true) +local package_path_str = "/Users/clintmccay/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/clintmccay/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/clintmccay/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/clintmccay/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/Users/clintmccay/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" +if not string.find(package.path, package_path_str, 1, true) then + package.path = package.path .. ';' .. package_path_str +end + +if not string.find(package.cpath, install_cpath_pattern, 1, true) then + package.cpath = package.cpath .. ';' .. install_cpath_pattern +end + +time([[Luarocks path setup]], false) +time([[try_loadstring definition]], true) +local function try_loadstring(s, component, name) + local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) + if not success then + vim.schedule(function() + vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) + end) + end + return result +end + +time([[try_loadstring definition]], false) +time([[Defining packer_plugins]], true) +_G.packer_plugins = { + ["ayu-vim"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/ayu-vim", + url = "https://github.com/ayu-theme/ayu-vim" + }, + gruvbox = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/gruvbox", + url = "https://github.com/morhetz/gruvbox" + }, + minimalist = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/minimalist", + url = "https://github.com/dikiaap/minimalist" + }, + ncm2 = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/ncm2", + url = "https://github.com/ncm2/ncm2" + }, + ["ncm2-bufword"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/ncm2-bufword", + url = "https://github.com/ncm2/ncm2-bufword" + }, + ["ncm2-jedi"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/ncm2-jedi", + url = "https://github.com/ncm2/ncm2-jedi" + }, + ["ncm2-path"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/ncm2-path", + url = "https://github.com/ncm2/ncm2-path" + }, + nerdtree = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nerdtree", + url = "https://github.com/preservim/nerdtree" + }, + ["nerdtree-git-plugin"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nerdtree-git-plugin", + url = "https://github.com/Xuyuanp/nerdtree-git-plugin" + }, + ["nvim-lspconfig"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + url = "https://github.com/neovim/nvim-lspconfig" + }, + ["nvim-web-devicons"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", + url = "https://github.com/kyazdani42/nvim-web-devicons" + }, + ["nvim-yarp"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-yarp", + url = "https://github.com/roxma/nvim-yarp" + }, + ["packer.nvim"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/packer.nvim", + url = "https://github.com/wbthomason/packer.nvim" + }, + ["plenary.nvim"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/plenary.nvim", + url = "https://github.com/nvim-lua/plenary.nvim" + }, + supertab = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/supertab", + url = "https://github.com/ervandew/supertab" + }, + ["telescope-file-browser.nvim"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/telescope-file-browser.nvim", + url = "https://github.com/nvim-telescope/telescope-file-browser.nvim" + }, + ["telescope-fzf-native.nvim"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim", + url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim" + }, + ["telescope.nvim"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/telescope.nvim", + url = "https://github.com/nvim-telescope/telescope.nvim" + }, + ["tender.vim"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/tender.vim", + url = "https://github.com/jacoborus/tender.vim" + }, + ["vim-airline"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-airline", + url = "https://github.com/vim-airline/vim-airline" + }, + ["vim-desert-warm-256"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-desert-warm-256", + url = "https://github.com/rainux/vim-desert-warm-256" + }, + ["vim-deus"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-deus", + url = "https://github.com/ajmwagar/vim-deus" + }, + ["vim-devicons"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-devicons", + url = "https://github.com/ryanoasis/vim-devicons" + }, + ["vim-railscasts-theme"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-railscasts-theme", + url = "https://github.com/jpo/vim-railscasts-theme" + }, + ["vim-slime"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-slime", + url = "https://github.com/jpalardy/vim-slime" + } +} + +time([[Defining packer_plugins]], false) + +_G._packer.inside_compile = false +if _G._packer.needs_bufread == true then + vim.cmd("doautocmd BufRead") +end +_G._packer.needs_bufread = false + +if should_profile then save_profiles() end + +end) + +if not no_errors then + error_msg = error_msg:gsub('"', '\\"') + vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') +end diff --git a/tmux/.config/tmux/statusline.conf b/tmux/.config/tmux/statusline.conf index 6f7361e..66d457b 100644 --- a/tmux/.config/tmux/statusline.conf +++ b/tmux/.config/tmux/statusline.conf @@ -1,17 +1,22 @@ # general +# set -g default-terminal "screen-256color" # left status -set-window-option -g status-left " #S " -set-window-option -g status-left-style "fg=green bg=black" +set-window-option -g status-left " (( #S )) " +set-window-option -g status-left-style "fg=blue bg=black" +set-window-option -g status-left-length 30 # right status set-window-option -g status-right " %I:%M%p %d-%b-%y " -set-window-option -g status-right-style "fg=green bg=black" +set-window-option -g status-right-style "fg=blue bg=black" -# ianctive windows +# inactive windows set-window-option -g window-status-format " #I: #W " # active windows set-window-option -g window-status-current-format " #I: #W " -set-window-option -g window-status-current-style "bg=black fg=green bright" +set-window-option -g window-status-current-style "bg=black fg=blue bright" + +# main bg color +set -g status-bg blue diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index 0fdc97c..a374901 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -5,6 +5,9 @@ unbind C-b set-option -g prefix '`' bind-key '`' send-prefix +# mouse scrolling +setw -g mouse on + # 0 is too far from Ctrl-a. set -g base-index 1 @@ -21,7 +24,7 @@ unbind '"' unbind % # reload config file (change file location to your the tmux.conf you want to use) -bind r source-file ~/.tmux.conf\; display ' Reloaded tmux config.' +bind r source-file ~/.config/tmux/tmux.conf\; display ' Reloaded tmux config.' # switch panes using Alt-arrow without prefix bind -n M-Left select-pane -L @@ -33,4 +36,7 @@ bind -n M-Down select-pane -D bind-key -n S-Left previous-window bind-key -n S-Right next-window +# Faster Esc +set-option -sg escape-time 10 + source ~/.config/tmux/statusline.conf From 3ff6d828befc66167d4df685de22eaca612a40e5 Mon Sep 17 00:00:00 2001 From: cmccay Date: Fri, 2 Dec 2022 13:54:41 -0600 Subject: [PATCH 2/9] lots more stuff --- alacritty/.config/alacritty/alacritty.yml | 2 +- nvim/.config/nvim/init.lua | 28 ++++++++ nvim/.config/nvim/lua/colorscheme.lua | 6 +- nvim/.config/nvim/lua/keybindings.lua | 16 +++++ nvim/.config/nvim/lua/plugins.lua | 64 +++++++++++------ nvim/.config/nvim/plugin/packer_compiled.lua | 75 +++++++++++++------- tmux/.config/tmux/statusline.conf | 2 +- 7 files changed, 142 insertions(+), 51 deletions(-) diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index d2a8348..9d1f388 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -1,5 +1,5 @@ window: - opacity: 0.8 + opacity: 0.95 font: size: 14 diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 3aaa95f..df4020e 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -18,3 +18,31 @@ require("telescope").setup{ require("telescope").load_extension("fzf") require("telescope").load_extension("file_browser") +require("telescope").load_extension("neoclip") +require('Comment').setup() +require('nvim-treesitter').setup({ + -- enable syntax highlighting + highlight = { + enable = true, + }, + -- enable indentation + indent = { enable = true }, + -- enable autotagging (w/ nvim-ts-autotag plugin) + autotag = { enable = true }, + -- ensure these language parsers are installed + ensure_installed = { + "json", + "yaml", + "html", + "css", + "markdown", + "bash", + "lua", + "vim", + "dockerfile", + "gitignore", + "python", + }, + -- auto install above language parsers + auto_install = true, +}) diff --git a/nvim/.config/nvim/lua/colorscheme.lua b/nvim/.config/nvim/lua/colorscheme.lua index 6a89d7f..0d62ada 100644 --- a/nvim/.config/nvim/lua/colorscheme.lua +++ b/nvim/.config/nvim/lua/colorscheme.lua @@ -2,9 +2,11 @@ -- vim.cmd("colorscheme ayu") -- vim.cmd("let ayucolor='mirage'") -- vim.cmd("colorscheme gruvbox") --- vim.cmd("colorscheme tender") +vim.cmd("colorscheme tender") -- vim.cmd("colorscheme railscasts") -- vim.cmd("colorscheme desert-warm-256") -vim.cmd("colorscheme deus") +-- vim.cmd("colorscheme deus") + +-- Ignore background color for transparency vim.cmd("highlight Normal ctermbg=none") vim.cmd("highlight NonText ctermbg=none") diff --git a/nvim/.config/nvim/lua/keybindings.lua b/nvim/.config/nvim/lua/keybindings.lua index d1dee0d..c426010 100644 --- a/nvim/.config/nvim/lua/keybindings.lua +++ b/nvim/.config/nvim/lua/keybindings.lua @@ -5,6 +5,18 @@ local keymap = vim.api.nvim_set_keymap local default_ops = { noremap = true, silent = true } +-- Quick escape insert mode +keymap('i', 'jk', '', default_ops) + +-- Delete single character without copying into register +keymap("n", "x", '"_x', default_ops) + +-- Window management +keymap("n", "sv", "v", default_ops) +keymap("n", "sh", "s", default_ops) +keymap("n", "se", "=", default_ops) +keymap("n", "sx", ":close", default_ops) + -- Save, Save/Quit keymap('n', '', ':w', default_ops) keymap('n', '', ':wq', default_ops) @@ -29,3 +41,7 @@ keymap('n', 'ff', ':Telescope find_files hidden=true', default_ops) keymap('n', 'gf', ':Telescope git_files', default_ops) keymap('n', 'lg', ':Telescope live_grep', default_ops) keymap('n', 'd', ':Telescope diagnostics', default_ops) +keymap('n', 'h', ':Telescope neoclip', default_ops) + +-- Buffers +keymap('n', 'b', ':JABSOpen', default_ops) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 1f0997d..6329fb3 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -6,6 +6,12 @@ return require('packer').startup(function(use) -- LSP use('neovim/nvim-lspconfig') + use('hrsh7th/cmp-nvim-lsp') + use('hrsh7th/cmp-nvim-lua') + use('hrsh7th/cmp-buffer') + use('hrsh7th/cmp-path') + use('hrsh7th/nvim-cmp') + use('saadparwaiz1/cmp_luasnip') -- colorschemes use('ayu-theme/ayu-vim') @@ -30,37 +36,51 @@ return require('packer').startup(function(use) -- SuperTab use('ervandew/supertab') - - -- Auto-Complete --- use('ncm2/ncm2') --- use('roxma/nvim-yarp') --- -- enable ncm2 for all buffers --- -- autocmd BufEnter * call ncm2#enable_for_buffer() --- -- IMPORTANT: :help Ncm2PopupOpen for more information --- -- set completeopt=noinsert,menuone,noselect --- use('ncm2/ncm2-bufword') -- Basic completion --- use('ncm2/ncm2-path') -- Path completion --- use('ncm2/ncm2-jedi') -- Python completion - -- better auto complete maybe - use('hrsh7th/cmp-nvim-lsp') - use('hrsh7th/cmp-nvim-lua') - use('hrsh7th/cmp-buffer') - use('hrsh7th/cmp-path') - use('hrsh7th/nvim-cmp') - use('saadparwaiz1/cmp_luasnip') - -- Slime, for tmux repl-ing + -- Vim-surround + use('tpope/vim-surround') + + -- Slime, for tmux repl-ing use('jpalardy/vim-slime') -- Telescope, fuzzy finding use('nvim-lua/plenary.nvim') use('nvim-telescope/telescope.nvim') - use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' } + use{'nvim-telescope/telescope-fzf-native.nvim', run = 'make' } use( "nvim-telescope/telescope-file-browser.nvim") -- Treesitter - -- use('nvim-treesitter/nvim-treesitter') + use{'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' } -- Devicons use('kyazdani42/nvim-web-devicons') -end) + + -- Registry history + use { + "AckslD/nvim-neoclip.lua", + requires = { + {'kkharji/sqlite.lua', module = 'sqlite'}, + {'nvim-telescope/telescope.nvim'}, + }, + config = function() + require('neoclip').setup({ + enable_persistent_history = true, + continuous_sync = true + } + ) + end, + } + + -- Buffers + use('matbme/JABS.nvim') + require("jabs").setup {} + + -- Comments + use { + 'numToStr/Comment.nvim', + config = function() + require('Comment').setup() + end +} + + end) diff --git a/nvim/.config/nvim/plugin/packer_compiled.lua b/nvim/.config/nvim/plugin/packer_compiled.lua index 4e107fa..475005f 100644 --- a/nvim/.config/nvim/plugin/packer_compiled.lua +++ b/nvim/.config/nvim/plugin/packer_compiled.lua @@ -79,6 +79,31 @@ _G.packer_plugins = { path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/ayu-vim", url = "https://github.com/ayu-theme/ayu-vim" }, + ["cmp-buffer"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/cmp-buffer", + url = "https://github.com/hrsh7th/cmp-buffer" + }, + ["cmp-nvim-lsp"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", + url = "https://github.com/hrsh7th/cmp-nvim-lsp" + }, + ["cmp-nvim-lua"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua", + url = "https://github.com/hrsh7th/cmp-nvim-lua" + }, + ["cmp-path"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/cmp-path", + url = "https://github.com/hrsh7th/cmp-path" + }, + cmp_luasnip = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/cmp_luasnip", + url = "https://github.com/saadparwaiz1/cmp_luasnip" + }, gruvbox = { loaded = true, path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/gruvbox", @@ -89,26 +114,6 @@ _G.packer_plugins = { path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/minimalist", url = "https://github.com/dikiaap/minimalist" }, - ncm2 = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/ncm2", - url = "https://github.com/ncm2/ncm2" - }, - ["ncm2-bufword"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/ncm2-bufword", - url = "https://github.com/ncm2/ncm2-bufword" - }, - ["ncm2-jedi"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/ncm2-jedi", - url = "https://github.com/ncm2/ncm2-jedi" - }, - ["ncm2-path"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/ncm2-path", - url = "https://github.com/ncm2/ncm2-path" - }, nerdtree = { loaded = true, path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nerdtree", @@ -119,21 +124,27 @@ _G.packer_plugins = { path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nerdtree-git-plugin", url = "https://github.com/Xuyuanp/nerdtree-git-plugin" }, + ["nvim-cmp"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-cmp", + url = "https://github.com/hrsh7th/nvim-cmp" + }, ["nvim-lspconfig"] = { loaded = true, path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", url = "https://github.com/neovim/nvim-lspconfig" }, + ["nvim-neoclip.lua"] = { + config = { "\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fneoclip\frequire\0" }, + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-neoclip.lua", + url = "https://github.com/AckslD/nvim-neoclip.lua" + }, ["nvim-web-devicons"] = { loaded = true, path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", url = "https://github.com/kyazdani42/nvim-web-devicons" }, - ["nvim-yarp"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-yarp", - url = "https://github.com/roxma/nvim-yarp" - }, ["packer.nvim"] = { loaded = true, path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/packer.nvim", @@ -174,6 +185,11 @@ _G.packer_plugins = { path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-airline", url = "https://github.com/vim-airline/vim-airline" }, + ["vim-airline-themes"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-airline-themes", + url = "https://github.com/vim-airline/vim-airline-themes" + }, ["vim-desert-warm-256"] = { loaded = true, path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-desert-warm-256", @@ -189,6 +205,11 @@ _G.packer_plugins = { path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-devicons", url = "https://github.com/ryanoasis/vim-devicons" }, + ["vim-fugitive"] = { + loaded = true, + path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-fugitive", + url = "https://github.com/tpope/vim-fugitive" + }, ["vim-railscasts-theme"] = { loaded = true, path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-railscasts-theme", @@ -202,6 +223,10 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) +-- Config for: nvim-neoclip.lua +time([[Config for nvim-neoclip.lua]], true) +try_loadstring("\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fneoclip\frequire\0", "config", "nvim-neoclip.lua") +time([[Config for nvim-neoclip.lua]], false) _G._packer.inside_compile = false if _G._packer.needs_bufread == true then diff --git a/tmux/.config/tmux/statusline.conf b/tmux/.config/tmux/statusline.conf index 66d457b..03acf66 100644 --- a/tmux/.config/tmux/statusline.conf +++ b/tmux/.config/tmux/statusline.conf @@ -3,7 +3,7 @@ set -g default-terminal "screen-256color" # left status -set-window-option -g status-left " (( #S )) " +set-window-option -g status-left " [ #S ] " set-window-option -g status-left-style "fg=blue bg=black" set-window-option -g status-left-length 30 From c522f86d906aae560281367224f9fc9377b65bc3 Mon Sep 17 00:00:00 2001 From: cmccay Date: Fri, 2 Dec 2022 14:43:52 -0600 Subject: [PATCH 3/9] lazygit stuff asdf --- nvim/.config/nvim/lua/keybindings.lua | 5 ++++- nvim/.config/nvim/lua/plugins.lua | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/nvim/.config/nvim/lua/keybindings.lua b/nvim/.config/nvim/lua/keybindings.lua index c426010..c966f6c 100644 --- a/nvim/.config/nvim/lua/keybindings.lua +++ b/nvim/.config/nvim/lua/keybindings.lua @@ -39,9 +39,12 @@ keymap('n', '', ':NERDTreeToggle', default_ops) -- Telescope stuff keymap('n', 'ff', ':Telescope find_files hidden=true', default_ops) keymap('n', 'gf', ':Telescope git_files', default_ops) -keymap('n', 'lg', ':Telescope live_grep', default_ops) +keymap('n', 's', ':Telescope live_grep', default_ops) keymap('n', 'd', ':Telescope diagnostics', default_ops) keymap('n', 'h', ':Telescope neoclip', default_ops) -- Buffers keymap('n', 'b', ':JABSOpen', default_ops) + +-- Git +keymap('n', 'gg', ':LazyGit', default_ops) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 6329fb3..52976b3 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -28,6 +28,7 @@ return require('packer').startup(function(use) -- Git use('tpope/vim-fugitive') + use('kdheepak/lazygit.nvim') -- NerdTree stuff use('preservim/nerdtree') @@ -81,6 +82,6 @@ return require('packer').startup(function(use) config = function() require('Comment').setup() end -} - + } + end) From cc2df09309d775f71d1f0f9cfadebcf4d3176c7b Mon Sep 17 00:00:00 2001 From: cmccay Date: Fri, 2 Dec 2022 15:48:18 -0600 Subject: [PATCH 4/9] telescope configs asdf --- nvim/.config/nvim/init.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index df4020e..6334d39 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -7,13 +7,25 @@ require("lsp") -- todo: move this to plugins.lua require("telescope").setup{ defaults = { + sorting_strategy = "ascending", + layout_strategy = "horizontal", + layout_config = { + prompt_position = "top", + }, prompt_prefix = "$ ", mappings = { i = { ["C-a"] = function() print("asdf") end } } - } + }, + pickers = { + live_grep = { + additional_args = function(opts) + return {"--hidden"} + end + }, + }, } require("telescope").load_extension("fzf") From eaa360d851713b29a18c8ec27da2e8ee477b25dd Mon Sep 17 00:00:00 2001 From: cmccay Date: Fri, 2 Dec 2022 18:45:35 -0600 Subject: [PATCH 5/9] color stuff --- alacritty/.config/alacritty/alacritty.yml | 68 +++++++++++------------ nvim/.config/nvim/init.lua | 1 + nvim/.config/nvim/lua/colorscheme.lua | 14 ++--- nvim/.config/nvim/lua/keybindings.lua | 5 +- nvim/.config/nvim/lua/plugins.lua | 7 ++- 5 files changed, 47 insertions(+), 48 deletions(-) diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index 9d1f388..06eb81e 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -1,5 +1,5 @@ window: - opacity: 0.95 + opacity: 0.9 font: size: 14 @@ -7,36 +7,36 @@ font: family: FiraMono Nerd Font style: Regular -# Colors (Oxide) -colors: - # Default colors - primary: - background: '#212121' - foreground: '#c0c5ce' - bright_foreground: '#f3f4f5' - - cursor: - text: '#212121' - cursor: '#c0c5ce' - - # Normal colors - normal: - black: '#212121' - red: '#e57373' - green: '#a6bc69' - yellow: '#fac863' - blue: '#6699cc' - magenta: '#c594c5' - cyan: '#5fb3b3' - white: '#c0c5ce' - - # Bright colors - bright: - black: '#5c5c5c' - red: '#e57373' - green: '#a6bc69' - yellow: '#fac863' - blue: '#6699cc' - magenta: '#c594c5' - cyan: '#5fb3b3' - white: '#f3f4f5' +# # Colors (Oxide) +# colors: +# # Default colors +# primary: +# background: '#212121' +# foreground: '#c0c5ce' +# bright_foreground: '#f3f4f5' +# +# cursor: +# text: '#212121' +# cursor: '#c0c5ce' +# +# # Normal colors +# normal: +# black: '#212121' +# red: '#e57373' +# green: '#a6bc69' +# yellow: '#fac863' +# blue: '#6699cc' +# magenta: '#c594c5' +# cyan: '#5fb3b3' +# white: '#c0c5ce' +# +# # Bright colors +# bright: +# black: '#5c5c5c' +# red: '#e57373' +# green: '#a6bc69' +# yellow: '#fac863' +# blue: '#6699cc' +# magenta: '#c594c5' +# cyan: '#5fb3b3' +# white: '#f3f4f5' diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 6334d39..28131dd 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -54,6 +54,7 @@ require('nvim-treesitter').setup({ "dockerfile", "gitignore", "python", + "sql", }, -- auto install above language parsers auto_install = true, diff --git a/nvim/.config/nvim/lua/colorscheme.lua b/nvim/.config/nvim/lua/colorscheme.lua index 0d62ada..a87efce 100644 --- a/nvim/.config/nvim/lua/colorscheme.lua +++ b/nvim/.config/nvim/lua/colorscheme.lua @@ -1,12 +1,6 @@ --- vim.cmd("colorscheme minimalist") --- vim.cmd("colorscheme ayu") --- vim.cmd("let ayucolor='mirage'") --- vim.cmd("colorscheme gruvbox") -vim.cmd("colorscheme tender") --- vim.cmd("colorscheme railscasts") --- vim.cmd("colorscheme desert-warm-256") --- vim.cmd("colorscheme deus") +vim.cmd("colorscheme ayu") -- Ignore background color for transparency -vim.cmd("highlight Normal ctermbg=none") -vim.cmd("highlight NonText ctermbg=none") +vim.cmd("highlight Normal guibg=none") +vim.cmd("highlight NonText guibg=none") + diff --git a/nvim/.config/nvim/lua/keybindings.lua b/nvim/.config/nvim/lua/keybindings.lua index c966f6c..b0ddaff 100644 --- a/nvim/.config/nvim/lua/keybindings.lua +++ b/nvim/.config/nvim/lua/keybindings.lua @@ -42,9 +42,8 @@ keymap('n', 'gf', ':Telescope git_files', default_ops) keymap('n', 's', ':Telescope live_grep', default_ops) keymap('n', 'd', ':Telescope diagnostics', default_ops) keymap('n', 'h', ':Telescope neoclip', default_ops) - --- Buffers -keymap('n', 'b', ':JABSOpen', default_ops) +keymap('n', 'b', ':Telescope buffers', default_ops) +keymap('n', 'c', ':Telescope colorscheme', default_ops) -- Git keymap('n', 'gg', ':LazyGit', default_ops) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 52976b3..aace833 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -14,13 +14,18 @@ return require('packer').startup(function(use) use('saadparwaiz1/cmp_luasnip') -- colorschemes - use('ayu-theme/ayu-vim') + -- use('ayu-theme/ayu-vim') + use('Shatur/neovim-ayu') use('morhetz/gruvbox') use('dikiaap/minimalist') use('jacoborus/tender.vim') use('jpo/vim-railscasts-theme') use('rainux/vim-desert-warm-256') use('ajmwagar/vim-deus') + use('catppuccin/nvim') + use('bluz71/vim-moonfly-colors') + use('savq/melange') + use('srcery-colors/srcery-vim') -- airline use('vim-airline/vim-airline') From 228a795e500341381918fad58b2f3b98d8705bad Mon Sep 17 00:00:00 2001 From: cmccay Date: Mon, 5 Dec 2022 11:59:47 -0600 Subject: [PATCH 6/9] fix font name --- alacritty/.config/alacritty/alacritty.yml | 68 +++++++++++------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index 06eb81e..b3bf919 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -4,39 +4,39 @@ window: font: size: 14 normal: - family: FiraMono Nerd Font + family: FiraCode Nerd Font style: Regular -# # Colors (Oxide) -# colors: -# # Default colors -# primary: -# background: '#212121' -# foreground: '#c0c5ce' -# bright_foreground: '#f3f4f5' -# -# cursor: -# text: '#212121' -# cursor: '#c0c5ce' -# -# # Normal colors -# normal: -# black: '#212121' -# red: '#e57373' -# green: '#a6bc69' -# yellow: '#fac863' -# blue: '#6699cc' -# magenta: '#c594c5' -# cyan: '#5fb3b3' -# white: '#c0c5ce' -# -# # Bright colors -# bright: -# black: '#5c5c5c' -# red: '#e57373' -# green: '#a6bc69' -# yellow: '#fac863' -# blue: '#6699cc' -# magenta: '#c594c5' -# cyan: '#5fb3b3' -# white: '#f3f4f5' +# Colors (Oxide) +colors: + # Default colors + primary: + background: '#212121' + foreground: '#c0c5ce' + bright_foreground: '#f3f4f5' + + cursor: + text: '#212121' + cursor: '#c0c5ce' + + # Normal colors + normal: + black: '#212121' + red: '#e57373' + green: '#a6bc69' + yellow: '#fac863' + blue: '#6699cc' + magenta: '#c594c5' + cyan: '#5fb3b3' + white: '#c0c5ce' + + # Bright colors + bright: + black: '#5c5c5c' + red: '#e57373' + green: '#a6bc69' + yellow: '#fac863' + blue: '#6699cc' + magenta: '#c594c5' + cyan: '#5fb3b3' + white: '#f3f4f5' From 4affa10c5c9ec77e53bfe42bd39944cf97ff8783 Mon Sep 17 00:00:00 2001 From: cmccay Date: Tue, 6 Dec 2022 12:03:12 -0600 Subject: [PATCH 7/9] statusline stuff --- nvim/.config/nvim/init.lua | 1 + nvim/.config/nvim/lua/colorscheme.lua | 10 +++++-- nvim/.config/nvim/lua/plugins.lua | 9 ++++-- nvim/.config/nvim/lua/statusline.lua | 40 +++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 nvim/.config/nvim/lua/statusline.lua diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 28131dd..52cb588 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -3,6 +3,7 @@ require("keybindings") require("settings") require("colorscheme") require("lsp") +require("statusline") -- todo: move this to plugins.lua require("telescope").setup{ diff --git a/nvim/.config/nvim/lua/colorscheme.lua b/nvim/.config/nvim/lua/colorscheme.lua index a87efce..b702e83 100644 --- a/nvim/.config/nvim/lua/colorscheme.lua +++ b/nvim/.config/nvim/lua/colorscheme.lua @@ -1,6 +1,12 @@ -vim.cmd("colorscheme ayu") +-- general theme +vim.cmd("colorscheme gruvbox") --- Ignore background color for transparency +-- ignore background color for transparency vim.cmd("highlight Normal guibg=none") vim.cmd("highlight NonText guibg=none") +vim.cmd("highlight Normal ctermbg=none") +vim.cmd("highlight NonText ctermbg=none") + +-- airline theme +vim.g.airline_theme = "deus" diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index aace833..ab1f2af 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -28,8 +28,9 @@ return require('packer').startup(function(use) use('srcery-colors/srcery-vim') -- airline - use('vim-airline/vim-airline') - use('vim-airline/vim-airline-themes') + -- use('vim-airline/vim-airline') + -- use('vim-airline/vim-airline-themes') + use('nvim-lualine/lualine.nvim') -- Git use('tpope/vim-fugitive') @@ -88,5 +89,7 @@ return require('packer').startup(function(use) require('Comment').setup() end } - + + -- Virtual Env + use('jmcantrell/vim-virtualenv') end) diff --git a/nvim/.config/nvim/lua/statusline.lua b/nvim/.config/nvim/lua/statusline.lua new file mode 100644 index 0000000..5d8ac16 --- /dev/null +++ b/nvim/.config/nvim/lua/statusline.lua @@ -0,0 +1,40 @@ +require('lualine').setup { + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = {'mode', 'buffers'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} +} From 032db0aaef828ad891c6a4d8401f24876eae355b Mon Sep 17 00:00:00 2001 From: cmccay Date: Tue, 6 Dec 2022 13:01:12 -0600 Subject: [PATCH 8/9] remove nerdtree --- nvim/.config/nvim/lua/keybindings.lua | 4 +--- nvim/.config/nvim/lua/plugins.lua | 9 --------- nvim/.config/nvim/lua/statusline.lua | 6 ++++-- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/nvim/.config/nvim/lua/keybindings.lua b/nvim/.config/nvim/lua/keybindings.lua index b0ddaff..a7b79de 100644 --- a/nvim/.config/nvim/lua/keybindings.lua +++ b/nvim/.config/nvim/lua/keybindings.lua @@ -33,9 +33,6 @@ keymap('n', '', 'O', default_ops) keymap('n', '', 'za', default_ops) -- keymap('n', '', 'za', default_ops) --- NERDTree stuff -keymap('n', '', ':NERDTreeToggle', default_ops) - -- Telescope stuff keymap('n', 'ff', ':Telescope find_files hidden=true', default_ops) keymap('n', 'gf', ':Telescope git_files', default_ops) @@ -44,6 +41,7 @@ keymap('n', 'd', ':Telescope diagnostics', default_ops) keymap('n', 'h', ':Telescope neoclip', default_ops) keymap('n', 'b', ':Telescope buffers', default_ops) keymap('n', 'c', ':Telescope colorscheme', default_ops) +keymap('n', 'fb', ':Telescope file_browser hidden=true theme=dropdown', default_ops) -- Git keymap('n', 'gg', ':LazyGit', default_ops) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index ab1f2af..4d3c95a 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -36,11 +36,6 @@ return require('packer').startup(function(use) use('tpope/vim-fugitive') use('kdheepak/lazygit.nvim') - -- NerdTree stuff - use('preservim/nerdtree') - use('Xuyuanp/nerdtree-git-plugin') - use('ryanoasis/vim-devicons') - -- SuperTab use('ervandew/supertab') @@ -78,10 +73,6 @@ return require('packer').startup(function(use) end, } - -- Buffers - use('matbme/JABS.nvim') - require("jabs").setup {} - -- Comments use { 'numToStr/Comment.nvim', diff --git a/nvim/.config/nvim/lua/statusline.lua b/nvim/.config/nvim/lua/statusline.lua index 5d8ac16..8c13907 100644 --- a/nvim/.config/nvim/lua/statusline.lua +++ b/nvim/.config/nvim/lua/statusline.lua @@ -18,7 +18,7 @@ require('lualine').setup { } }, sections = { - lualine_a = {'mode', 'buffers'}, + lualine_a = {'mode'}, lualine_b = {'branch', 'diff', 'diagnostics'}, lualine_c = {'filename'}, lualine_x = {'encoding', 'fileformat', 'filetype'}, @@ -33,7 +33,9 @@ require('lualine').setup { lualine_y = {}, lualine_z = {} }, - tabline = {}, + tabline = { + lualine_a = {'buffers'} + }, winbar = {}, inactive_winbar = {}, extensions = {} From 93b006df0de42fd3163f1d3987f78ca6f80e41e3 Mon Sep 17 00:00:00 2001 From: cmccay Date: Sat, 17 Dec 2022 17:02:47 -0600 Subject: [PATCH 9/9] asdf --- alacritty/.config/alacritty/alacritty.yml | 2 +- nvim/.config/nvim/init.lua | 4 +-- nvim/.config/nvim/lua/colorscheme.lua | 4 --- nvim/.config/nvim/lua/keybindings.lua | 36 +++++++++++------------ nvim/.config/nvim/lua/settings.lua | 5 ++-- 5 files changed, 23 insertions(+), 28 deletions(-) diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index b3bf919..cea7e26 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -1,5 +1,5 @@ window: - opacity: 0.9 + opacity: 0.8 font: size: 14 diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 52cb588..3fb0aa8 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -32,8 +32,8 @@ require("telescope").setup{ require("telescope").load_extension("fzf") require("telescope").load_extension("file_browser") require("telescope").load_extension("neoclip") -require('Comment').setup() -require('nvim-treesitter').setup({ +require("Comment").setup() +require("nvim-treesitter").setup({ -- enable syntax highlighting highlight = { enable = true, diff --git a/nvim/.config/nvim/lua/colorscheme.lua b/nvim/.config/nvim/lua/colorscheme.lua index b702e83..6e8b3f5 100644 --- a/nvim/.config/nvim/lua/colorscheme.lua +++ b/nvim/.config/nvim/lua/colorscheme.lua @@ -6,7 +6,3 @@ vim.cmd("highlight Normal guibg=none") vim.cmd("highlight NonText guibg=none") vim.cmd("highlight Normal ctermbg=none") vim.cmd("highlight NonText ctermbg=none") - - --- airline theme -vim.g.airline_theme = "deus" diff --git a/nvim/.config/nvim/lua/keybindings.lua b/nvim/.config/nvim/lua/keybindings.lua index a7b79de..3a42a8b 100644 --- a/nvim/.config/nvim/lua/keybindings.lua +++ b/nvim/.config/nvim/lua/keybindings.lua @@ -6,7 +6,7 @@ local keymap = vim.api.nvim_set_keymap local default_ops = { noremap = true, silent = true } -- Quick escape insert mode -keymap('i', 'jk', '', default_ops) +keymap("i", "jk", "", default_ops) -- Delete single character without copying into register keymap("n", "x", '"_x', default_ops) @@ -15,33 +15,33 @@ keymap("n", "x", '"_x', default_ops) keymap("n", "sv", "v", default_ops) keymap("n", "sh", "s", default_ops) keymap("n", "se", "=", default_ops) +keymap("n", "sw", "w", default_ops) keymap("n", "sx", ":close", default_ops) -- Save, Save/Quit -keymap('n', '', ':w', default_ops) -keymap('n', '', ':wq', default_ops) +keymap("n", "", ":w", default_ops) +keymap("n", "", ":wq", default_ops) -- Tab through open buffers -keymap('n', '[b', ':bp', default_ops) -keymap('n', ']b', ':bn', default_ops) +keymap("n", "[b", ":bp", default_ops) +keymap("n", "]b", ":bn", default_ops) -- Enter lines -keymap('n', '', 'o', default_ops) -keymap('n', '', 'O', default_ops) +keymap("n", "", "o", default_ops) +keymap("n", "", "O", default_ops) -- Folding -keymap('n', '', 'za', default_ops) --- keymap('n', '', 'za', default_ops) +keymap("n", "", "za", default_ops) -- Telescope stuff -keymap('n', 'ff', ':Telescope find_files hidden=true', default_ops) -keymap('n', 'gf', ':Telescope git_files', default_ops) -keymap('n', 's', ':Telescope live_grep', default_ops) -keymap('n', 'd', ':Telescope diagnostics', default_ops) -keymap('n', 'h', ':Telescope neoclip', default_ops) -keymap('n', 'b', ':Telescope buffers', default_ops) -keymap('n', 'c', ':Telescope colorscheme', default_ops) -keymap('n', 'fb', ':Telescope file_browser hidden=true theme=dropdown', default_ops) +keymap("n", "ff", ":Telescope find_files hidden=true", default_ops) +keymap("n", "gf", ":Telescope git_files", default_ops) +keymap("n", "s", ":Telescope live_grep", default_ops) +keymap("n", "d", ":Telescope diagnostics", default_ops) +keymap("n", "h", ":Telescope neoclip", default_ops) +keymap("n", "b", ":Telescope buffers", default_ops) +keymap("n", "c", ":Telescope colorscheme", default_ops) +keymap("n", "fb", ":Telescope file_browser hidden=true theme=dropdown", default_ops) -- Git -keymap('n', 'gg', ':LazyGit', default_ops) +keymap("n", "gg", ":LazyGit", default_ops) diff --git a/nvim/.config/nvim/lua/settings.lua b/nvim/.config/nvim/lua/settings.lua index e526e2d..1688780 100644 --- a/nvim/.config/nvim/lua/settings.lua +++ b/nvim/.config/nvim/lua/settings.lua @@ -14,7 +14,6 @@ settings.shiftwidth = 4 settings.softtabstop = 4 settings.autoindent = true settings.smartindent = true --- settings.colorcolumn = "80" -- Folding settings.foldmethod = "indent" @@ -22,10 +21,10 @@ settings.foldnestmax = 99 settings.foldlevelstart = 99 -- slime -vim.g.slime_target = 'tmux' +vim.g.slime_target = "tmux" vim.g.slime_default_config = { socket_name = vim.api.nvim_eval('get(split($TMUX, ","), 0)'), - target_pane = '{bottom}', + target_pane = "{bottom}", } -- Airline