diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index 705396d..175ea01 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -1,9 +1,9 @@ window: - opacity: 0.85 + opacity: 0.9 font: normal: - family: monospace + family: FiraCode Nerd Font style: Regular # Colors (Oxide) diff --git a/nvim/.config/nvim/after/plugin/alpha.lua b/nvim/.config/nvim/after/plugin/alpha.lua new file mode 100644 index 0000000..10ec0ad --- /dev/null +++ b/nvim/.config/nvim/after/plugin/alpha.lua @@ -0,0 +1,73 @@ +local status_ok, alpha = pcall(require, "alpha") +if not status_ok then + return +end + +local dashboard = require("alpha.themes.dashboard") + +HYDRA = { + " ", + " ", + " ", + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", + " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", + " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", + " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", + " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", + " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", + " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", + " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", + " ", + } + +dashboard.section.header.val = HYDRA + +ANIME = { + '', + '⡆⣐⢕⢕⢕⢕⢕⢕⢕⢕⠅⢗⢕⢕⢕⢕⢕⢕⢕⠕⠕⢕⢕⢕⢕⢕⢕⢕⢕⢕', + '⢐⢕⢕⢕⢕⢕⣕⢕⢕⠕⠁⢕⢕⢕⢕⢕⢕⢕⢕⠅⡄⢕⢕⢕⢕⢕⢕⢕⢕⢕', + '⢕⢕⢕⢕⢕⠅⢗⢕⠕⣠⠄⣗⢕⢕⠕⢕⢕⢕⠕⢠⣿⠐⢕⢕⢕⠑⢕⢕⠵⢕', + '⢕⢕⢕⢕⠁⢜⠕⢁⣴⣿⡇⢓⢕⢵⢐⢕⢕⠕⢁⣾⢿⣧⠑⢕⢕⠄⢑⢕⠅⢕', + '⢕⢕⠵⢁⠔⢁⣤⣤⣶⣶⣶⡐⣕⢽⠐⢕⠕⣡⣾⣶⣶⣶⣤⡁⢓⢕⠄⢑⢅⢑', + '⠍⣧⠄⣶⣾⣿⣿⣿⣿⣿⣿⣷⣔⢕⢄⢡⣾⣿⣿⣿⣿⣿⣿⣿⣦⡑⢕⢤⠱⢐', + '⢠⢕⠅⣾⣿⠋⢿⣿⣿⣿⠉⣿⣿⣷⣦⣶⣽⣿⣿⠈⣿⣿⣿⣿⠏⢹⣷⣷⡅⢐', + '⣔⢕⢥⢻⣿⡀⠈⠛⠛⠁⢠⣿⣿⣿⣿⣿⣿⣿⣿⡀⠈⠛⠛⠁⠄⣼⣿⣿⡇⢔', + '⢕⢕⢽⢸⢟⢟⢖⢖⢤⣶⡟⢻⣿⡿⠻⣿⣿⡟⢀⣿⣦⢤⢤⢔⢞⢿⢿⣿⠁⢕', + '⢕⢕⠅⣐⢕⢕⢕⢕⢕⣿⣿⡄⠛⢀⣦⠈⠛⢁⣼⣿⢗⢕⢕⢕⢕⢕⢕⡏⣘⢕', + '⢕⢕⠅⢓⣕⣕⣕⣕⣵⣿⣿⣿⣾⣿⣿⣿⣿⣿⣿⣿⣷⣕⢕⢕⢕⢕⡵⢀⢕⢕', + '⢑⢕⠃⡈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢃⢕⢕⢕', + '⣆⢕⠄⢱⣄⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⢁⢕⢕⠕⢁', + '⣿⣦⡀⣿⣿⣷⣶⣬⣍⣛⣛⣛⡛⠿⠿⠿⠛⠛⢛⣛⣉⣭⣤⣂⢜⠕⢑⣡⣴⣿', + '', +} +dashboard.section.buttons.val = { + dashboard.button("f", " Find file", ":Telescope find_files "), + dashboard.button("e", " New file", ":ene startinsert "), + dashboard.button("p", " Find project", ":Telescope projects "), + dashboard.button("r", " Recently used files", ":Telescope oldfiles "), + dashboard.button("t", " Find text", ":Telescope live_grep "), + dashboard.button("c", " Configuration", ":e ~/.config/nvim/init.lua "), + dashboard.button("q", " Quit Neovim", ":qa"), +} + +local function footer() + -- NOTE: requires the fortune-mod package to work + -- local handle = io.popen("fortune") + -- local fortune = handle:read("*a") + -- handle:close() + -- return fortune + return "" +end + +dashboard.section.footer.val = footer() + +dashboard.section.footer.opts.hl = "Type" +dashboard.section.header.opts.hl = "Include" +dashboard.section.buttons.opts.hl = "Keyword" + +dashboard.opts.opts.noautocmd = true +-- vim.cmd([[autocmd User AlphaReady echo 'ready']]) +alpha.setup(dashboard.opts) diff --git a/nvim/.config/nvim/after/plugin/possession.lua b/nvim/.config/nvim/after/plugin/possession.lua new file mode 100644 index 0000000..0c59246 --- /dev/null +++ b/nvim/.config/nvim/after/plugin/possession.lua @@ -0,0 +1,9 @@ +require('possession').setup{ +autosave = { + current = false, -- or fun(name): boolean + tmp = true, -- or fun(): boolean + tmp_name = 'tmp', + on_load = true, + on_quit = true, +} +} diff --git a/nvim/.config/nvim/after/plugin/telescope.lua b/nvim/.config/nvim/after/plugin/telescope.lua new file mode 100644 index 0000000..478904f --- /dev/null +++ b/nvim/.config/nvim/after/plugin/telescope.lua @@ -0,0 +1,16 @@ +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") +require("telescope").load_extension("neoclip") +require("telescope").load_extension("possession") +require("telescope").load_extension("repo") diff --git a/nvim/.config/nvim/after/plugin/treesitter.lua b/nvim/.config/nvim/after/plugin/treesitter.lua new file mode 100644 index 0000000..893cbaf --- /dev/null +++ b/nvim/.config/nvim/after/plugin/treesitter.lua @@ -0,0 +1,26 @@ +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/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..155e723 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -1,5 +1,2 @@ -require("plugins") -require("keybindings") -require("settings") -require("colorscheme") -require("lsp") +require("clint") + diff --git a/nvim/.config/nvim/lua/colorscheme.lua b/nvim/.config/nvim/lua/clint/colorscheme.lua similarity index 81% rename from nvim/.config/nvim/lua/colorscheme.lua rename to nvim/.config/nvim/lua/clint/colorscheme.lua index 6a89d7f..419fdc9 100644 --- a/nvim/.config/nvim/lua/colorscheme.lua +++ b/nvim/.config/nvim/lua/clint/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 deus") -- 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/clint/completion.lua b/nvim/.config/nvim/lua/clint/completion.lua new file mode 100644 index 0000000..cd04840 --- /dev/null +++ b/nvim/.config/nvim/lua/clint/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/clint/init.lua b/nvim/.config/nvim/lua/clint/init.lua new file mode 100644 index 0000000..feda061 --- /dev/null +++ b/nvim/.config/nvim/lua/clint/init.lua @@ -0,0 +1,5 @@ +require("clint.plugins") +require("clint.keybindings") +require("clint.settings") +require("clint.colorscheme") +require("clint.lsp") diff --git a/nvim/.config/nvim/lua/clint/keybindings.lua b/nvim/.config/nvim/lua/clint/keybindings.lua new file mode 100644 index 0000000..1cd56a8 --- /dev/null +++ b/nvim/.config/nvim/lua/clint/keybindings.lua @@ -0,0 +1,62 @@ +-- Generic Keybindings for all files +-- +-- + +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) + +-- Tab through open buffers +keymap('n', '[b', ':bp', default_ops) +keymap('n', ']b', ':bn', default_ops) + +-- Enter lines +keymap('n', '', 'o', default_ops) +keymap('n', '', 'O', default_ops) + +-- Folding +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', 'lg', ':Telescope live_grep', default_ops) +keymap('n', 'd', ':Telescope diagnostics', default_ops) +keymap('n', 'h', ':Telescope neoclip', default_ops) +keymap('n', 'fb', ':Telescope file_browser hidden=true', default_ops) + +-- Buffers +keymap('n', 'b', ':JABSOpen', default_ops) + +-- Shift up and down +keymap("v", "J", ":m '>+1gv=gv", default_ops) +keymap("v", "K", ":m '<-2gv=gv", default_ops) + +-- Keep centered +keymap("n", "", "zz", default_ops) +keymap("n", "", "zz", default_ops) +keymap("n", "n", "nzzzv", default_ops) +keymap("n", "N", "Nzzzv", default_ops) + +-- Yank to system clipboard +keymap("n", "y", [["+y]], default_ops) +keymap("v", "y", [["+y]], default_ops) +keymap("n", "Y", [["+Y]], default_ops) + +-- Replace the word the cursor is currently on +keymap("n", "s", [[:%s/\<\>//gI]], default_ops) diff --git a/nvim/.config/nvim/lua/clint/lsp.lua b/nvim/.config/nvim/lua/clint/lsp.lua new file mode 100644 index 0000000..c58146f --- /dev/null +++ b/nvim/.config/nvim/lua/clint/lsp.lua @@ -0,0 +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/clint/plugins.lua b/nvim/.config/nvim/lua/clint/plugins.lua new file mode 100644 index 0000000..622490d --- /dev/null +++ b/nvim/.config/nvim/lua/clint/plugins.lua @@ -0,0 +1,105 @@ +vim.cmd [[packadd packer.nvim]] + +return require('packer').startup(function(use) + -- Packer can manage itself + use('wbthomason/packer.nvim') + + -- 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') + 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') + + -- airline + use('vim-airline/vim-airline') + use('vim-airline/vim-airline-themes') + + -- Git + use('tpope/vim-fugitive') + + -- Sessions + -- use('tpope/vim-obsession') + use { + 'jedrzejboczar/possession.nvim', + requires = { 'nvim-lua/plenary.nvim' }, + } + + -- NerdTree stuff + use('preservim/nerdtree') + use('Xuyuanp/nerdtree-git-plugin') + use('ryanoasis/vim-devicons') + + -- SuperTab + use('ervandew/supertab') + + -- 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', run = ':TSUpdate' } + + -- Devicons + use('kyazdani42/nvim-web-devicons') + + -- 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 + } + + -- Git Repo Telescope + use{'cljoly/telescope-repo.nvim'} + + -- Greeter + use { + 'goolord/alpha-nvim', + requires = { 'nvim-tree/nvim-web-devicons' }, + config = function () + require'alpha'.setup(require'alpha.themes.startify'.config) + end + } + + end +) + + diff --git a/nvim/.config/nvim/lua/settings.lua b/nvim/.config/nvim/lua/clint/settings.lua similarity index 79% rename from nvim/.config/nvim/lua/settings.lua rename to nvim/.config/nvim/lua/clint/settings.lua index c9480a0..dd977a1 100644 --- a/nvim/.config/nvim/lua/settings.lua +++ b/nvim/.config/nvim/lua/clint/settings.lua @@ -4,9 +4,12 @@ local settings = vim.opt settings.relativenumber = true settings.number = true +-- Scrolling +settings.scrolloff = 10 + -- Searching settings.incsearch = true -settings.hls = true +settings.hls = false -- Indentation (move to python specific file) settings.tabstop = 4 @@ -14,7 +17,6 @@ settings.shiftwidth = 4 settings.softtabstop = 4 settings.autoindent = true settings.smartindent = true -settings.colorcolumn = "80" -- Folding settings.foldmethod = "indent" @@ -27,3 +29,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/lua/keybindings.lua b/nvim/.config/nvim/lua/keybindings.lua deleted file mode 100644 index 231e95e..0000000 --- a/nvim/.config/nvim/lua/keybindings.lua +++ /dev/null @@ -1,22 +0,0 @@ -local keymap = vim.api.nvim_set_keymap -local default_ops = { noremap = true, silent = true } - --- Save, Save/Quit -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) - --- Enter lines -keymap('n', '', 'o', default_ops) -keymap('n', '', 'O', default_ops) - --- Folding -keymap('n', '', 'za', default_ops) --- keymap('n', '', 'za', default_ops) - --- NERDTree stuff -keymap('n', '', ':NERDTreeToggle', default_ops) - diff --git a/nvim/.config/nvim/lua/lsp.lua b/nvim/.config/nvim/lua/lsp.lua deleted file mode 100644 index 2c9dbc9..0000000 --- a/nvim/.config/nvim/lua/lsp.lua +++ /dev/null @@ -1,7 +0,0 @@ -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}) - end -} diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua deleted file mode 100644 index a2eac90..0000000 --- a/nvim/.config/nvim/lua/plugins.lua +++ /dev/null @@ -1,50 +0,0 @@ -vim.cmd [[packadd packer.nvim]] - -return require('packer').startup(function(use) - -- Packer can manage itself - use('wbthomason/packer.nvim') - - -- LSP - use('neovim/nvim-lspconfig') - - -- colorschemes - use('ayu-theme/ayu-vim') - 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') - - -- airline - use('vim-airline/vim-airline') - - -- NerdTree stuff - use('preservim/nerdtree') - use('Xuyuanp/nerdtree-git-plugin') - use('ryanoasis/vim-devicons') - - -- 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 - - -- Slime, for tmux repl-ing - use('jpalardy/vim-slime') - - -- Telescope, fuzzy finding - use('nvim-lua/plenary.nvim') - use('nvim-telescope/telescope.nvim') - - -- Treesitter - use('nvim-treesitter/nvim-treesitter') -end) diff --git a/nvim/.config/nvim/plugin/packer_compiled.lua b/nvim/.config/nvim/plugin/packer_compiled.lua new file mode 100644 index 0000000..3e89b6b --- /dev/null +++ b/nvim/.config/nvim/plugin/packer_compiled.lua @@ -0,0 +1,309 @@ +-- 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/clint/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/clint/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/clint/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/clint/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/Users/clint/.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 = { + ["Comment.nvim"] = { + 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\fComment\frequire\0" }, + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/Comment.nvim", + url = "https://github.com/numToStr/Comment.nvim" + }, + ["JABS.nvim"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/JABS.nvim", + url = "https://github.com/matbme/JABS.nvim" + }, + ["ayu-vim"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/ayu-vim", + url = "https://github.com/ayu-theme/ayu-vim" + }, + ["cmp-buffer"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/cmp-buffer", + url = "https://github.com/hrsh7th/cmp-buffer" + }, + ["cmp-nvim-lsp"] = { + loaded = true, + path = "/Users/clint/.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/clint/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua", + url = "https://github.com/hrsh7th/cmp-nvim-lua" + }, + ["cmp-path"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/cmp-path", + url = "https://github.com/hrsh7th/cmp-path" + }, + cmp_luasnip = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/cmp_luasnip", + url = "https://github.com/saadparwaiz1/cmp_luasnip" + }, + gruvbox = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/gruvbox", + url = "https://github.com/morhetz/gruvbox" + }, + minimalist = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/minimalist", + url = "https://github.com/dikiaap/minimalist" + }, + nerdtree = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/nerdtree", + url = "https://github.com/preservim/nerdtree" + }, + ["nerdtree-git-plugin"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/nerdtree-git-plugin", + url = "https://github.com/Xuyuanp/nerdtree-git-plugin" + }, + ["nvim-cmp"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/nvim-cmp", + url = "https://github.com/hrsh7th/nvim-cmp" + }, + ["nvim-lspconfig"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + url = "https://github.com/neovim/nvim-lspconfig" + }, + ["nvim-neoclip.lua"] = { + config = { "\27LJ\2\nh\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\2\20continuous_sync\2\30enable_persistent_history\2\nsetup\fneoclip\frequire\0" }, + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/nvim-neoclip.lua", + url = "https://github.com/AckslD/nvim-neoclip.lua" + }, + ["nvim-treesitter"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/nvim-treesitter", + url = "https://github.com/nvim-treesitter/nvim-treesitter" + }, + ["nvim-web-devicons"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", + url = "https://github.com/kyazdani42/nvim-web-devicons" + }, + ["packer.nvim"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/packer.nvim", + url = "https://github.com/wbthomason/packer.nvim" + }, + ["plenary.nvim"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/plenary.nvim", + url = "https://github.com/nvim-lua/plenary.nvim" + }, + ["possession.nvim"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/possession.nvim", + url = "https://github.com/jedrzejboczar/possession.nvim" + }, + ["sqlite.lua"] = { + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/clint/.local/share/nvim/site/pack/packer/opt/sqlite.lua", + url = "https://github.com/kkharji/sqlite.lua" + }, + supertab = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/supertab", + url = "https://github.com/ervandew/supertab" + }, + ["telescope-file-browser.nvim"] = { + loaded = true, + path = "/Users/clint/.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/clint/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim", + url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim" + }, + ["telescope-repo.nvim"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/telescope-repo.nvim", + url = "https://github.com/cljoly/telescope-repo.nvim" + }, + ["telescope.nvim"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/telescope.nvim", + url = "https://github.com/nvim-telescope/telescope.nvim" + }, + ["tender.vim"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/tender.vim", + url = "https://github.com/jacoborus/tender.vim" + }, + ["vim-airline"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/vim-airline", + url = "https://github.com/vim-airline/vim-airline" + }, + ["vim-airline-themes"] = { + loaded = true, + path = "/Users/clint/.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/clint/.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/clint/.local/share/nvim/site/pack/packer/start/vim-deus", + url = "https://github.com/ajmwagar/vim-deus" + }, + ["vim-devicons"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/vim-devicons", + url = "https://github.com/ryanoasis/vim-devicons" + }, + ["vim-fugitive"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/vim-fugitive", + url = "https://github.com/tpope/vim-fugitive" + }, + ["vim-railscasts-theme"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/vim-railscasts-theme", + url = "https://github.com/jpo/vim-railscasts-theme" + }, + ["vim-slime"] = { + loaded = true, + path = "/Users/clint/.local/share/nvim/site/pack/packer/start/vim-slime", + url = "https://github.com/jpalardy/vim-slime" + } +} + +time([[Defining packer_plugins]], false) +local module_lazy_loads = { + ["^sqlite"] = "sqlite.lua" +} +local lazy_load_called = {['packer.load'] = true} +local function lazy_load_module(module_name) + local to_load = {} + if lazy_load_called[module_name] then return nil end + lazy_load_called[module_name] = true + for module_pat, plugin_name in pairs(module_lazy_loads) do + if not _G.packer_plugins[plugin_name].loaded and string.match(module_name, module_pat) then + to_load[#to_load + 1] = plugin_name + end + end + + if #to_load > 0 then + require('packer.load')(to_load, {module = module_name}, _G.packer_plugins) + local loaded_mod = package.loaded[module_name] + if loaded_mod then + return function(modname) return loaded_mod end + end + end +end + +if not vim.g.packer_custom_loader_enabled then + table.insert(package.loaders, 1, lazy_load_module) + vim.g.packer_custom_loader_enabled = true +end + +-- Config for: nvim-neoclip.lua +time([[Config for nvim-neoclip.lua]], true) +try_loadstring("\27LJ\2\nh\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\2\20continuous_sync\2\30enable_persistent_history\2\nsetup\fneoclip\frequire\0", "config", "nvim-neoclip.lua") +time([[Config for nvim-neoclip.lua]], false) +-- Config for: Comment.nvim +time([[Config for Comment.nvim]], 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\fComment\frequire\0", "config", "Comment.nvim") +time([[Config for Comment.nvim]], 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