From 191d1cd3ec41ecf49ca960aa3ad5c520c7da33cc Mon Sep 17 00:00:00 2001 From: c Date: Fri, 6 Jan 2023 00:17:18 -0600 Subject: [PATCH 01/17] fuck --- nvim/.config/nvim/init.lua | 24 +- nvim/.config/nvim/lua/clint/init.lua | 6 - .../.config/nvim/lua/clint/lazy_bootstrap.lua | 12 + nvim/.config/nvim/lua/clint/plugins.lua | 164 +--------- nvim/.config/nvim/lua/clint/telescope.lua | 21 ++ nvim/.config/nvim/plugin/packer_compiled.lua | 309 ------------------ 6 files changed, 61 insertions(+), 475 deletions(-) create mode 100644 nvim/.config/nvim/lua/clint/lazy_bootstrap.lua create mode 100644 nvim/.config/nvim/lua/clint/telescope.lua delete mode 100644 nvim/.config/nvim/plugin/packer_compiled.lua diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 155e723..372d7c2 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -1,2 +1,24 @@ -require("clint") +-- ├── init.lua +-- ├── ... +-- └── lua +-- ├── plugins +-- │ ├── init.lua +-- │ └── telescope.lua +-- └── clint +-- ├── init.lua +-- ├── lazy_bootstrap.lua +-- ├── maps.lua +-- └── options.lua + +----------------------------------------------[[ Bootstrap Lazy ]] + +require("clint/lazy_bootstrap") -- bootstraps folke/lazy + +----------------------------------------------[[ User Settings ]] + +require("clint") -- loads lua/clint/init.lua + +----------------------------------------------[[ Load Plugins ]] + +require("lazy").setup("plugins") -- loads each lua/plugin/* diff --git a/nvim/.config/nvim/lua/clint/init.lua b/nvim/.config/nvim/lua/clint/init.lua index 6cf447e..e69de29 100644 --- a/nvim/.config/nvim/lua/clint/init.lua +++ b/nvim/.config/nvim/lua/clint/init.lua @@ -1,6 +0,0 @@ -require("clint.plugins") -require("clint.keybindings") -require("clint.settings") -require("clint.colorscheme") -require("clint.lsp") -require("clint.statusline") diff --git a/nvim/.config/nvim/lua/clint/lazy_bootstrap.lua b/nvim/.config/nvim/lua/clint/lazy_bootstrap.lua new file mode 100644 index 0000000..049159d --- /dev/null +++ b/nvim/.config/nvim/lua/clint/lazy_bootstrap.lua @@ -0,0 +1,12 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "--single-branch", + "https://github.com/folke/lazy.nvim.git", + lazypath, + }) +end +vim.opt.runtimepath:prepend(lazypath) diff --git a/nvim/.config/nvim/lua/clint/plugins.lua b/nvim/.config/nvim/lua/clint/plugins.lua index 8139293..6759ebb 100644 --- a/nvim/.config/nvim/lua/clint/plugins.lua +++ b/nvim/.config/nvim/lua/clint/plugins.lua @@ -1,159 +1,5 @@ -vim.fn.setenv("MACOSX_DEPLOYMENT_TARGET", "12.2.1") - -vim.cmd [[packadd packer.nvim]] - -return require('packer').startup(function(use) - -- Packer can manage itself - use('wbthomason/packer.nvim') - - -- LSP - -- mason - manager for lsp, dap, linter - use("williamboman/mason.nvim") - use("williamboman/mason-lspconfig.nvim") - 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') - - -- Linter - use('jose-elias-alvarez/null-ls.nvim') - local null_ls = require('null-ls') - - require('null-ls').setup({ - sources = { null_ls.builtins.diagnostics.selene } - }) - - -- 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') - use("rebelot/kanagawa.nvim") - -- airline - use('nvim-lualine/lualine.nvim') - - -- Git - use('kdheepak/lazygit.nvim') - - -- Sessions - use("tpope/vim-obsession") - - -- SuperTab - use('ervandew/supertab') - - -- 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-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 - } - - -- Which-Key - use { - "folke/which-key.nvim", - config = function() - require("which-key").setup { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - } - end - } - - -- Close brackets - use { - "windwp/nvim-autopairs", - config = function() require("nvim-autopairs").setup {} end - } - - -- Cursor line - use('yamatsum/nvim-cursorline') - require('nvim-cursorline').setup { - cursorline = { - enable = true, - timeout = 0, - number = true, - }, - cursorword = { - enable = false, - } - } - - -- file ex - use { - "nvim-neo-tree/neo-tree.nvim", - branch = "v2.x", - requires = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended - "MunifTanjim/nui.nvim", - } - } - - -- Indent lines - require("packer").startup(function() - use "lukas-reineke/indent-blankline.nvim" - end) - - -- Object Explorer - use 'simrat39/symbols-outline.nvim' - -end -) +require("lazy").setup({ + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + "folke/neodev.nvim", +}) diff --git a/nvim/.config/nvim/lua/clint/telescope.lua b/nvim/.config/nvim/lua/clint/telescope.lua new file mode 100644 index 0000000..9d6781a --- /dev/null +++ b/nvim/.config/nvim/lua/clint/telescope.lua @@ -0,0 +1,21 @@ +local M = { + 'nvim-telescope/telescope.nvim', branch = '0.1.x', + dependencies = { + {'nvim-lua/plenary.nvim'} + }, + cmd = { "Telescope", "Tel" }, -- lazy loads on these commands + keys = { "f" }, -- lazy loads on this pattern +} + +function M.config() + local telescope = require("telescope") + telescope.setup({}) + + local builtin = require('telescope.builtin') + vim.keymap.set('n', 'ff', builtin.find_files, {}) + vim.keymap.set('n', 'fg', builtin.live_grep, {}) + vim.keymap.set('n', 'fb', builtin.buffers, {}) + vim.keymap.set('n', 'fh', builtin.help_tags, {}) +end + +return M diff --git a/nvim/.config/nvim/plugin/packer_compiled.lua b/nvim/.config/nvim/plugin/packer_compiled.lua deleted file mode 100644 index 41a08c3..0000000 --- a/nvim/.config/nvim/plugin/packer_compiled.lua +++ /dev/null @@ -1,309 +0,0 @@ --- 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 = { - ["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/clintmccay/.local/share/nvim/site/pack/packer/start/Comment.nvim", - url = "https://github.com/numToStr/Comment.nvim" - }, - ["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", - url = "https://github.com/morhetz/gruvbox" - }, - ["lazygit.nvim"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/lazygit.nvim", - url = "https://github.com/kdheepak/lazygit.nvim" - }, - ["lualine.nvim"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/lualine.nvim", - url = "https://github.com/nvim-lualine/lualine.nvim" - }, - melange = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/melange", - url = "https://github.com/savq/melange" - }, - minimalist = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/minimalist", - url = "https://github.com/dikiaap/minimalist" - }, - ["neovim-ayu"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/neovim-ayu", - url = "https://github.com/Shatur/neovim-ayu" - }, - nvim = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim", - url = "https://github.com/catppuccin/nvim" - }, - ["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\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/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-neoclip.lua", - url = "https://github.com/AckslD/nvim-neoclip.lua" - }, - ["nvim-treesitter"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/nvim-treesitter", - url = "https://github.com/nvim-treesitter/nvim-treesitter" - }, - ["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" - }, - ["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" - }, - ["sqlite.lua"] = { - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/opt/sqlite.lua", - url = "https://github.com/kkharji/sqlite.lua" - }, - ["srcery-vim"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/srcery-vim", - url = "https://github.com/srcery-colors/srcery-vim" - }, - 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-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-fugitive"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-fugitive", - url = "https://github.com/tpope/vim-fugitive" - }, - ["vim-moonfly-colors"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-moonfly-colors", - url = "https://github.com/bluz71/vim-moonfly-colors" - }, - ["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" - }, - ["vim-surround"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-surround", - url = "https://github.com/tpope/vim-surround" - }, - ["vim-virtualenv"] = { - loaded = true, - path = "/Users/clintmccay/.local/share/nvim/site/pack/packer/start/vim-virtualenv", - url = "https://github.com/jmcantrell/vim-virtualenv" - } -} - -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: 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) --- 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) - -_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 From 9b3299e972f21efd85e1b57a7d1dfffeba1549e6 Mon Sep 17 00:00:00 2001 From: c Date: Tue, 10 Jan 2023 13:58:14 -0600 Subject: [PATCH 02/17] so much stuff --- nvim/.config/nvim/after/plugin/which-key.lua | 40 +++++ nvim/.config/nvim/init.lua | 26 ++- nvim/.config/nvim/lua/clint/colorscheme.lua | 8 +- nvim/.config/nvim/lua/clint/init.lua | 6 + nvim/.config/nvim/lua/clint/keybindings.lua | 14 +- nvim/.config/nvim/lua/clint/lsp.lua | 127 ++++++++------- nvim/.config/nvim/lua/clint/plugins.lua | 6 +- nvim/.config/nvim/lua/clint/telescope.lua | 21 --- nvim/.config/nvim/lua/plugins/init.lua | 158 +++++++++++++++++++ 9 files changed, 293 insertions(+), 113 deletions(-) create mode 100644 nvim/.config/nvim/after/plugin/which-key.lua delete mode 100644 nvim/.config/nvim/lua/clint/telescope.lua create mode 100644 nvim/.config/nvim/lua/plugins/init.lua diff --git a/nvim/.config/nvim/after/plugin/which-key.lua b/nvim/.config/nvim/after/plugin/which-key.lua new file mode 100644 index 0000000..8f3da0f --- /dev/null +++ b/nvim/.config/nvim/after/plugin/which-key.lua @@ -0,0 +1,40 @@ +-- Using this strictly to document for now. Actual mappings are in +-- lua/clint/keybindings.lua + +local wk = require("which-key") + +wk.register({ + [""] = { + -- File related stuff + f = { + name = "+file", + f = "Find File", + s = "Live Search", + b = "File Browser (delete this?)", + }, + -- Git related stuff + g = { + name = "+git", + g = "LazyGit", + f = "Git Files", + }, + -- Misc + c = "Change Color Scheme", + y = "Yank to system clipboard", + Y = "Yank to system clipboard", + d = "Diagnostics", + e = "File Explorer", + s = "Find and Replace", + b = "Buffers", + h = "Registers", + o = "Object Explorer", + fo = "Format Current File", + -- LSP related stuff + r = "Rename Object", + K = "Hover", + gd = "Go to definition", + -- Debugging + B = "Set Breakpoint", + [""] = "Debug: Continue", -- this doesnt work + }, +}) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 372d7c2..6c5656f 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -1,24 +1,16 @@ --- ├── init.lua --- ├── ... --- └── lua --- ├── plugins --- │ ├── init.lua --- │ └── telescope.lua --- └── clint --- ├── init.lua --- ├── lazy_bootstrap.lua --- ├── maps.lua --- └── options.lua +vim.g.mapleader = '\\' -----------------------------------------------[[ Bootstrap Lazy ]] - -require("clint/lazy_bootstrap") -- bootstraps folke/lazy +require("clint/lazy_bootstrap") -- bootstraps folke/lazy ----------------------------------------------[[ User Settings ]] -require("clint") -- loads lua/clint/init.lua +require("clint") -- loads lua/clint/init.lua ----------------------------------------------[[ Load Plugins ]] -require("lazy").setup("plugins") -- loads each lua/plugin/* - +require("lazy").setup( + { + spec = "plugins", + install = { colorscheme = { "gruvbox", "habamax" } } + } +) -- loads each lua/plugin/* diff --git a/nvim/.config/nvim/lua/clint/colorscheme.lua b/nvim/.config/nvim/lua/clint/colorscheme.lua index 710cd1e..6e8b3f5 100644 --- a/nvim/.config/nvim/lua/clint/colorscheme.lua +++ b/nvim/.config/nvim/lua/clint/colorscheme.lua @@ -2,7 +2,7 @@ vim.cmd("colorscheme gruvbox") -- 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") +vim.cmd("highlight Normal guibg=none") +vim.cmd("highlight NonText guibg=none") +vim.cmd("highlight Normal ctermbg=none") +vim.cmd("highlight NonText ctermbg=none") diff --git a/nvim/.config/nvim/lua/clint/init.lua b/nvim/.config/nvim/lua/clint/init.lua index e69de29..88190c6 100644 --- a/nvim/.config/nvim/lua/clint/init.lua +++ b/nvim/.config/nvim/lua/clint/init.lua @@ -0,0 +1,6 @@ +require("clint.keybindings") +require("clint.settings") +require("clint.colorscheme") +require("clint.lsp") +require("clint.statusline") +-- require("clint.debug") diff --git a/nvim/.config/nvim/lua/clint/keybindings.lua b/nvim/.config/nvim/lua/clint/keybindings.lua index b10618e..4abb156 100644 --- a/nvim/.config/nvim/lua/clint/keybindings.lua +++ b/nvim/.config/nvim/lua/clint/keybindings.lua @@ -34,8 +34,8 @@ 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', 'fs', ':Telescope live_grep', default_ops) +keymap('n', 'fr', ':Telescope oldfiles', default_ops) keymap('n', 'd', ':Telescope diagnostics', default_ops) keymap('n', 'h', ':Telescope neoclip', default_ops) keymap('n', 'b', ':Telescope buffers', default_ops) @@ -52,6 +52,8 @@ keymap("n", "", "zz", default_ops) keymap("n", "n", "nzzzv", default_ops) keymap("n", "N", "Nzzzv", default_ops) keymap("n", "G", "Gzz", default_ops) +keymap("n", "{", "{zz", default_ops) +keymap("n", "}", "}zz", default_ops) -- Yank to system clipboard keymap("n", "y", [["+y]], default_ops) @@ -63,7 +65,15 @@ keymap("n", "s", [[:%s/\<\>//gI]], -- Git keymap('n', 'gg', ':LazyGit', default_ops) +keymap('n', 'gf', ':Telescope git_files', default_ops) -- File Explorer keymap('n', 'e', ':NeoTreeFocusToggle', default_ops) +-- Object Explorer +keymap('n', 'o', ':SymbolsOutline', default_ops) + +-- Debugging +keymap('n', 'B', ":lua require'dap'.toggle_breakpoint()", default_ops) +keymap('n', '', ":lua require'dap'.continue()", default_ops) +keymap('n', 'D', ":lua require'dapui'.toggle()", default_ops) diff --git a/nvim/.config/nvim/lua/clint/lsp.lua b/nvim/.config/nvim/lua/clint/lsp.lua index 710eb90..a1e5ff8 100644 --- a/nvim/.config/nvim/lua/clint/lsp.lua +++ b/nvim/.config/nvim/lua/clint/lsp.lua @@ -1,81 +1,80 @@ -local cmp = require'cmp' +local cmp = require 'cmp' local capabilities = require('cmp_nvim_lsp').default_capabilities() local 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}) - vim.keymap.set("n", "fo", vim.lsp.buf.format, {buffer=0}) - end + 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 }) + vim.keymap.set("n", "fo", vim.lsp.buf.format, { buffer = 0 }) +end -require'lspconfig'.pyright.setup{ +require 'lspconfig'.pyright.setup { capabilities = capabilities, on_attach = on_attach } -require'lspconfig'.sumneko_lua.setup{ +require 'lspconfig'.sumneko_lua.setup { capabilities = capabilities, on_attach = on_attach, settings = { - Lua = { - diagnostics = { - globals = { 'vim' } - } - } - } + Lua = { + diagnostics = { + globals = { 'vim' } + } + } + } } 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' }, - }) - }) + 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' }, - }) - }) +-- 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' } - }) - }) +-- 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 index 6759ebb..99ea2a3 100644 --- a/nvim/.config/nvim/lua/clint/plugins.lua +++ b/nvim/.config/nvim/lua/clint/plugins.lua @@ -1,5 +1 @@ -require("lazy").setup({ - "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - "folke/neodev.nvim", -}) +-- can delete this i think diff --git a/nvim/.config/nvim/lua/clint/telescope.lua b/nvim/.config/nvim/lua/clint/telescope.lua deleted file mode 100644 index 9d6781a..0000000 --- a/nvim/.config/nvim/lua/clint/telescope.lua +++ /dev/null @@ -1,21 +0,0 @@ -local M = { - 'nvim-telescope/telescope.nvim', branch = '0.1.x', - dependencies = { - {'nvim-lua/plenary.nvim'} - }, - cmd = { "Telescope", "Tel" }, -- lazy loads on these commands - keys = { "f" }, -- lazy loads on this pattern -} - -function M.config() - local telescope = require("telescope") - telescope.setup({}) - - local builtin = require('telescope.builtin') - vim.keymap.set('n', 'ff', builtin.find_files, {}) - vim.keymap.set('n', 'fg', builtin.live_grep, {}) - vim.keymap.set('n', 'fb', builtin.buffers, {}) - vim.keymap.set('n', 'fh', builtin.help_tags, {}) -end - -return M diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua new file mode 100644 index 0000000..1520879 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -0,0 +1,158 @@ +return { + + -------------------- + -- LSP + -------------------- + + { "williamboman/mason.nvim" }, + { "williamboman/mason-lspconfig.nvim" }, + { 'neovim/nvim-lspconfig' }, + { 'hrsh7th/cmp-nvim-lsp' }, + { 'hrsh7th/cmp-nvim-lua' }, + { 'hrsh7th/cmp-buffer' }, + { 'hrsh7th/cmp-path' }, + { 'hrsh7th/nvim-cmp' }, + { 'saadparwaiz1/cmp_luasnip' }, + + -- Linter + { 'jose-elias-alvarez/null-ls.nvim', + config = function() + local nls = require("null-ls") + nls.setup({ + sources = { + nls.builtins.diagnostics.selene, + }, + }) + end, + }, + + -- Debugging + { 'mfussenegger/nvim-dap' }, + { 'rcarriga/nvim-dap-ui', config = true }, + { "mfussenegger/nvim-dap-python", config = true }, + + -------------------- + -- Color schemes + -------------------- + + { 'ayu-theme/ayu-vim' }, + { 'morhetz/gruvbox' }, + { 'dikiaap/minimalist' }, + { 'jacoborus/tender.vim' }, + { 'jpo/vim-railscasts-theme' }, + { 'rainux/vim-desert-warm-256' }, + { 'ajmwagar/vim-deus' }, + { "rebelot/kanagawa.nvim" }, + + -------------------- + -- Utility + -------------------- + + -- Git + { 'kdheepak/lazygit.nvim' }, + + -- Sessions + { "tpope/vim-obsession" }, + + -- SuperTab + { 'ervandew/supertab' }, + + -- Vim-surround + { 'tpope/vim-surround' }, + + -- Slime, for tmux repl-ing + { 'jpalardy/vim-slime' }, + + -- Telescope, fuzzy finding + { 'nvim-lua/plenary.nvim' }, + { 'nvim-telescope/telescope.nvim' }, + { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }, + { "nvim-telescope/telescope-file-browser.nvim" }, + + -- Treesitter + { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' }, + + -- Registry history + { + "AckslD/nvim-neoclip.lua", + dependencies = { + { 'kkharji/sqlite.lua', module = 'sqlite' }, + { 'nvim-telescope/telescope.nvim' }, + }, + config = { + enable_persistent_history = true, + continuous_sync = true + }, + }, + + -- Auto pairs + { "windwp/nvim-autopairs", config = true }, -- See `config` under https://github.com/folke/lazy.nvim#-plugin-spec + + -- Comment / uncomment + { "numToStr/Comment.nvim", config = true }, + + -- Git Repo Telescope + { 'cljoly/telescope-repo.nvim' }, + + -- Which-Key + { + "folke/which-key.nvim", + config = true, + }, + + -- File Explorer + { + "nvim-neo-tree/neo-tree.nvim", + branch = "v2.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended + "MunifTanjim/nui.nvim", + }, + }, + + -- Object Explorer + { 'simrat39/symbols-outline.nvim', + config = { + auto_preview = true, + } + }, + + -------------------- + -- Aesthetics + -------------------- + + -- airline + { 'nvim-lualine/lualine.nvim' }, + + -- Devicons + { 'kyazdani42/nvim-web-devicons' }, + + -- Indent lines + { "lukas-reineke/indent-blankline.nvim" }, + + -- Cursor line + { 'yamatsum/nvim-cursorline', + config = + { + cursorline = { + enable = true, + timeout = 0, + number = true, + }, + cursorword = { + enable = false, + } + } + }, + + -- Greeter + { + 'goolord/alpha-nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + -- config = function(}, + -- require 'alpha'.setup(require 'alpha.themes.startify'.config}, + -- end + }, + +} From 21b3c18f938a20939d0ff532f75000ba01802467 Mon Sep 17 00:00:00 2001 From: c Date: Tue, 10 Jan 2023 20:55:05 -0600 Subject: [PATCH 03/17] new color :) --- nvim/.config/nvim/lua/plugins/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index 1520879..868ffdb 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -43,6 +43,7 @@ return { { 'rainux/vim-desert-warm-256' }, { 'ajmwagar/vim-deus' }, { "rebelot/kanagawa.nvim" }, + { "glepnir/oceanic-material" }, -------------------- -- Utility @@ -50,6 +51,7 @@ return { -- Git { 'kdheepak/lazygit.nvim' }, + { 'lewis6991/gitsigns.nvim', config = true }, -- Sessions { "tpope/vim-obsession" }, From 3f6193eb3c69d3220668fd6019aa52cd1a16ec74 Mon Sep 17 00:00:00 2001 From: c Date: Wed, 11 Jan 2023 17:05:54 -0600 Subject: [PATCH 04/17] gitblame and formatting --- nvim/.config/nvim/after/plugin/which-key.lua | 1 + nvim/.config/nvim/lua/clint/keybindings.lua | 1 + nvim/.config/nvim/lua/clint/statusline.lua | 85 ++++++++++---------- nvim/.config/nvim/lua/plugins/init.lua | 19 ++++- 4 files changed, 60 insertions(+), 46 deletions(-) diff --git a/nvim/.config/nvim/after/plugin/which-key.lua b/nvim/.config/nvim/after/plugin/which-key.lua index 8f3da0f..e36a0f3 100644 --- a/nvim/.config/nvim/after/plugin/which-key.lua +++ b/nvim/.config/nvim/after/plugin/which-key.lua @@ -17,6 +17,7 @@ wk.register({ name = "+git", g = "LazyGit", f = "Git Files", + b = "Git Blame", }, -- Misc c = "Change Color Scheme", diff --git a/nvim/.config/nvim/lua/clint/keybindings.lua b/nvim/.config/nvim/lua/clint/keybindings.lua index 4abb156..d474528 100644 --- a/nvim/.config/nvim/lua/clint/keybindings.lua +++ b/nvim/.config/nvim/lua/clint/keybindings.lua @@ -66,6 +66,7 @@ keymap("n", "s", [[:%s/\<\>//gI]], -- Git keymap('n', 'gg', ':LazyGit', default_ops) keymap('n', 'gf', ':Telescope git_files', default_ops) +keymap('n', 'gb', ':Gitsigns toggle_deleted', default_ops) -- File Explorer keymap('n', 'e', ':NeoTreeFocusToggle', default_ops) diff --git a/nvim/.config/nvim/lua/clint/statusline.lua b/nvim/.config/nvim/lua/clint/statusline.lua index 0732f9a..64d9d83 100644 --- a/nvim/.config/nvim/lua/clint/statusline.lua +++ b/nvim/.config/nvim/lua/clint/statusline.lua @@ -1,43 +1,42 @@ - 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'}, - 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 = { - lualine_a = {'buffers'} - }, - winbar = {}, - inactive_winbar = {}, - extensions = {} - } - +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' }, + lualine_b = { 'branch', 'diff', 'diagnostics' }, + lualine_c = { { 'filename', path = 1 } }, + 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 = { + lualine_a = { 'buffers' } + }, + winbar = {}, + inactive_winbar = {}, + extensions = {} +} diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index 868ffdb..e7caedd 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -37,7 +37,6 @@ return { { 'ayu-theme/ayu-vim' }, { 'morhetz/gruvbox' }, - { 'dikiaap/minimalist' }, { 'jacoborus/tender.vim' }, { 'jpo/vim-railscasts-theme' }, { 'rainux/vim-desert-warm-256' }, @@ -51,7 +50,19 @@ return { -- Git { 'kdheepak/lazygit.nvim' }, - { 'lewis6991/gitsigns.nvim', config = true }, + { 'lewis6991/gitsigns.nvim', config = { + signs = { + add = { hl = 'GitSignsAdd', text = '+', numhl = 'GitSignsAddNr', linehl = 'GitSignsAddLn' }, + change = { hl = 'GitSignsChange', text = '│', numhl = 'GitSignsChangeNr', linehl = 'GitSignsChangeLn' }, + delete = { hl = 'GitSignsDelete', text = '-', numhl = 'GitSignsDeleteNr', linehl = 'GitSignsDeleteLn' }, + topdelete = { hl = 'GitSignsDelete', text = '‾', numhl = 'GitSignsDeleteNr', linehl = 'GitSignsDeleteLn' }, + changedelete = { hl = 'GitSignsChange', text = '~', numhl = 'GitSignsChangeNr', linehl = 'GitSignsChangeLn' }, + untracked = { hl = 'GitSignsAdd', text = '┆', numhl = 'GitSignsAddNr', linehl = 'GitSignsAddLn' }, + }, + current_line_blame = true, + show_deleted = true, + } + }, -- Sessions { "tpope/vim-obsession" }, @@ -120,6 +131,8 @@ return { } }, + { 'akinsho/toggleterm.nvim', version = "*", config = true }, + -------------------- -- Aesthetics -------------------- @@ -128,7 +141,7 @@ return { { 'nvim-lualine/lualine.nvim' }, -- Devicons - { 'kyazdani42/nvim-web-devicons' }, + { 'nvim-tree/nvim-web-devicons' }, -- Indent lines { "lukas-reineke/indent-blankline.nvim" }, From c9f18d83dfe0ebbef26da7b1c5d3c1a30648bc06 Mon Sep 17 00:00:00 2001 From: c Date: Wed, 11 Jan 2023 18:11:14 -0600 Subject: [PATCH 05/17] remove airline stuff --- nvim/.config/nvim/lua/clint/settings.lua | 4 ---- nvim/.config/nvim/lua/clint/statusline.lua | 11 ++++++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/nvim/.config/nvim/lua/clint/settings.lua b/nvim/.config/nvim/lua/clint/settings.lua index 5202b91..8d588af 100644 --- a/nvim/.config/nvim/lua/clint/settings.lua +++ b/nvim/.config/nvim/lua/clint/settings.lua @@ -29,7 +29,3 @@ 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/clint/statusline.lua b/nvim/.config/nvim/lua/clint/statusline.lua index 64d9d83..31bae49 100644 --- a/nvim/.config/nvim/lua/clint/statusline.lua +++ b/nvim/.config/nvim/lua/clint/statusline.lua @@ -1,7 +1,8 @@ require('lualine').setup { options = { icons_enabled = true, - theme = 'auto', + -- theme = 'auto', + theme = 'gruvbox', component_separators = { left = '', right = '' }, section_separators = { left = '', right = '' }, disabled_filetypes = { @@ -20,10 +21,10 @@ require('lualine').setup { sections = { lualine_a = { 'mode' }, lualine_b = { 'branch', 'diff', 'diagnostics' }, - lualine_c = { { 'filename', path = 1 } }, - lualine_x = { 'encoding', 'fileformat', 'filetype' }, - lualine_y = { 'progress' }, - lualine_z = { 'location' } + lualine_c = { { 'filename', path = 1, file_status = true } }, + lualine_x = { 'encoding', 'fileformat', }, + lualine_y = { 'filetype' }, + lualine_z = {} }, inactive_sections = { lualine_a = {}, From 3e0a3be243ba806e158f71341bfb85998bf879a5 Mon Sep 17 00:00:00 2001 From: c Date: Thu, 12 Jan 2023 16:38:49 -0600 Subject: [PATCH 06/17] asdf --- nvim/.config/nvim/lua/plugins/init.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index e7caedd..6aadab2 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -131,13 +131,19 @@ return { } }, - { 'akinsho/toggleterm.nvim', version = "*", config = true }, + { 'akinsho/toggleterm.nvim', + version = "*", + config = { + open_mapping = [[]], + -- direction = 'float' + } + }, -------------------- -- Aesthetics -------------------- - -- airline + -- status line { 'nvim-lualine/lualine.nvim' }, -- Devicons From 7c7b898c5ebad500e0571041b2eb089e270d5d7b Mon Sep 17 00:00:00 2001 From: cmccay Date: Thu, 12 Jan 2023 16:42:49 -0600 Subject: [PATCH 07/17] more stuff --- nvim/.config/nvim/after/plugin/which-key.lua | 4 +++- nvim/.config/nvim/init.lua | 2 +- nvim/.config/nvim/lua/clint/colorscheme.lua | 10 ++++---- nvim/.config/nvim/lua/clint/lsp.lua | 24 ++++++++++++++++++++ nvim/.config/nvim/lua/plugins/init.lua | 4 ++-- 5 files changed, 35 insertions(+), 9 deletions(-) diff --git a/nvim/.config/nvim/after/plugin/which-key.lua b/nvim/.config/nvim/after/plugin/which-key.lua index 8f3da0f..0b245fd 100644 --- a/nvim/.config/nvim/after/plugin/which-key.lua +++ b/nvim/.config/nvim/after/plugin/which-key.lua @@ -11,6 +11,7 @@ wk.register({ f = "Find File", s = "Live Search", b = "File Browser (delete this?)", + r = "Recent Files", }, -- Git related stuff g = { @@ -34,7 +35,8 @@ wk.register({ K = "Hover", gd = "Go to definition", -- Debugging + D = "Debug UI", B = "Set Breakpoint", - [""] = "Debug: Continue", -- this doesnt work + [""] = "Debug: Continue", }, }) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 6c5656f..913444a 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -11,6 +11,6 @@ require("clint") -- loads lua/clint/init.lua require("lazy").setup( { spec = "plugins", - install = { colorscheme = { "gruvbox", "habamax" } } + install = { colorscheme = { "gruvbox", } } } ) -- loads each lua/plugin/* diff --git a/nvim/.config/nvim/lua/clint/colorscheme.lua b/nvim/.config/nvim/lua/clint/colorscheme.lua index 6e8b3f5..a10b852 100644 --- a/nvim/.config/nvim/lua/clint/colorscheme.lua +++ b/nvim/.config/nvim/lua/clint/colorscheme.lua @@ -1,8 +1,8 @@ -- general theme vim.cmd("colorscheme gruvbox") --- 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") +-- -- 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") diff --git a/nvim/.config/nvim/lua/clint/lsp.lua b/nvim/.config/nvim/lua/clint/lsp.lua index a1e5ff8..00907ed 100644 --- a/nvim/.config/nvim/lua/clint/lsp.lua +++ b/nvim/.config/nvim/lua/clint/lsp.lua @@ -13,6 +13,11 @@ require 'lspconfig'.pyright.setup { on_attach = on_attach } +-- require 'lspconfig'.black.setup { +-- capabilities = capabilities, +-- on_attach = on_attach +-- } + require 'lspconfig'.sumneko_lua.setup { capabilities = capabilities, on_attach = on_attach, @@ -38,6 +43,25 @@ cmp.setup({ -- documentation = cmp.config.window.bordered(), }, mapping = cmp.mapping.preset.insert({ + + + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + -- elseif has_words_before() then + -- cmp.complete() + else + fallback() + end + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + else + fallback() + end + end, { "i", "s" }), + [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete(), diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index 1520879..e8b60d6 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -20,7 +20,7 @@ return { local nls = require("null-ls") nls.setup({ sources = { - nls.builtins.diagnostics.selene, + nls.builtins.formatting.black, }, }) end, @@ -126,7 +126,7 @@ return { { 'nvim-lualine/lualine.nvim' }, -- Devicons - { 'kyazdani42/nvim-web-devicons' }, + { 'nvim-tree/nvim-web-devicons' }, -- Indent lines { "lukas-reineke/indent-blankline.nvim" }, From 130e01a04663eedc89cc6a493f600bc58cfb8c88 Mon Sep 17 00:00:00 2001 From: cmccay Date: Fri, 20 Jan 2023 23:01:40 -0600 Subject: [PATCH 08/17] asdf --- nvim/.config/nvim/lua/plugins/init.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index 7257ac4..287f88a 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -29,14 +29,16 @@ return { -- Debugging { 'mfussenegger/nvim-dap' }, { 'rcarriga/nvim-dap-ui', config = true }, - { "mfussenegger/nvim-dap-python", config = true }, + { "mfussenegger/nvim-dap-python" }, + { "theHamsta/nvim-dap-virtual-text", config = true }, -------------------- -- Color schemes -------------------- { 'ayu-theme/ayu-vim' }, - { 'morhetz/gruvbox' }, + -- { 'morhetz/gruvbox' }, + { 'ellisonleao/gruvbox.nvim' }, { 'jacoborus/tender.vim' }, { 'jpo/vim-railscasts-theme' }, { 'rainux/vim-desert-warm-256' }, @@ -131,6 +133,7 @@ return { } }, + -- Terminal { 'akinsho/toggleterm.nvim', version = "*", config = { @@ -176,4 +179,6 @@ return { -- end }, + -- Scroll bar + { 'petertriho/nvim-scrollbar', config = true }, } From f08bbd78179dda69f363013bdd2796ccc57555b9 Mon Sep 17 00:00:00 2001 From: c Date: Fri, 20 Jan 2023 23:21:44 -0600 Subject: [PATCH 09/17] personal comp --- alacritty/.config/alacritty/alacritty.yml | 3 ++ nvim/.config/nvim/after/plugin/dap.lua | 26 ++++++++++++++++ nvim/.config/nvim/init.lua | 2 ++ nvim/.config/nvim/lua/clint/colorscheme.lua | 12 ++++---- nvim/.config/nvim/lua/clint/dap.lua | 34 +++++++++++++++++++++ nvim/.config/nvim/lua/clint/init.lua | 1 - nvim/.config/nvim/lua/clint/keybindings.lua | 2 ++ nvim/.config/nvim/lua/plugins/init.lua | 3 +- tmux/.config/tmux/tmux.conf | 10 +++--- 9 files changed, 80 insertions(+), 13 deletions(-) create mode 100644 nvim/.config/nvim/after/plugin/dap.lua create mode 100644 nvim/.config/nvim/lua/clint/dap.lua diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index 6396397..e178a3a 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -119,3 +119,6 @@ key_bindings: - { key: Backslash, mods: Alt, chars: "\x1b\\" } # Alt + \ - { key: Backslash, mods: Alt, chars: "\x1b\\" } # Alt + \ - { key: Slash, mods: Alt, chars: "\x1b/" } # Alt + / + - { key: Left, mods: Alt, chars: "\x1b[1;3D" } + - { key: Right, mods: Alt, chars: "\x1b[1;3C" } + diff --git a/nvim/.config/nvim/after/plugin/dap.lua b/nvim/.config/nvim/after/plugin/dap.lua new file mode 100644 index 0000000..f1dce8f --- /dev/null +++ b/nvim/.config/nvim/after/plugin/dap.lua @@ -0,0 +1,26 @@ +local dap = require('dap') +dap.configurations.python = { + { + -- The first three options are required by nvim-dap + type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` + request = 'launch'; + name = "Launch file"; + + -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options + + program = "${file}"; -- This configuration will launch the current file if used. + pythonPath = function() + -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. + -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. + -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. + local cwd = vim.fn.getcwd() + if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then + return cwd .. '/venv/bin/python' + elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then + return cwd .. '/.venv/bin/python' + else + return '/usr/bin/python' + end + end; + }, +} diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 6c5656f..783a98e 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -14,3 +14,5 @@ require("lazy").setup( install = { colorscheme = { "gruvbox", "habamax" } } } ) -- loads each lua/plugin/* + +require('dap-python').setup('~/.virtualenvs/debugpy/bin/python') diff --git a/nvim/.config/nvim/lua/clint/colorscheme.lua b/nvim/.config/nvim/lua/clint/colorscheme.lua index 6e8b3f5..f0e511a 100644 --- a/nvim/.config/nvim/lua/clint/colorscheme.lua +++ b/nvim/.config/nvim/lua/clint/colorscheme.lua @@ -1,8 +1,8 @@ -- general theme -vim.cmd("colorscheme gruvbox") +vim.cmd("colorscheme kanagawa") --- 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") +-- -- 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") diff --git a/nvim/.config/nvim/lua/clint/dap.lua b/nvim/.config/nvim/lua/clint/dap.lua new file mode 100644 index 0000000..bedde6d --- /dev/null +++ b/nvim/.config/nvim/lua/clint/dap.lua @@ -0,0 +1,34 @@ +local dap = require('dap') +dap.adapters.python = { + type = 'executable'; + command = '~/.virtualenvs/debugpy/bin/python'; + args = { '-m', 'debugpy.adapter' }; +} + + +local dap = require('dap') +dap.configurations.python = { + { + -- The first three options are required by nvim-dap + type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` + request = 'launch'; + name = "Launch file"; + + -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options + + program = "${file}"; -- This configuration will launch the current file if used. + pythonPath = function() + -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. + -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. + -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. + local cwd = vim.fn.getcwd() + if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then + return cwd .. '/venv/bin/python' + elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then + return cwd .. '/.venv/bin/python' + else + return 'python3' + end + end; + }, +} diff --git a/nvim/.config/nvim/lua/clint/init.lua b/nvim/.config/nvim/lua/clint/init.lua index 88190c6..b193c2e 100644 --- a/nvim/.config/nvim/lua/clint/init.lua +++ b/nvim/.config/nvim/lua/clint/init.lua @@ -3,4 +3,3 @@ require("clint.settings") require("clint.colorscheme") require("clint.lsp") require("clint.statusline") --- require("clint.debug") diff --git a/nvim/.config/nvim/lua/clint/keybindings.lua b/nvim/.config/nvim/lua/clint/keybindings.lua index d474528..c890541 100644 --- a/nvim/.config/nvim/lua/clint/keybindings.lua +++ b/nvim/.config/nvim/lua/clint/keybindings.lua @@ -77,4 +77,6 @@ keymap('n', 'o', ':SymbolsOutline', default_ops) -- Debugging keymap('n', 'B', ":lua require'dap'.toggle_breakpoint()", default_ops) keymap('n', '', ":lua require'dap'.continue()", default_ops) +keymap('n', '', ":lua require'dap'.step_into()", default_ops) +keymap('n', '', ":lua require'dap'.step_over()", default_ops) keymap('n', 'D', ":lua require'dapui'.toggle()", default_ops) diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index 6aadab2..7293b1c 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -29,7 +29,8 @@ return { -- Debugging { 'mfussenegger/nvim-dap' }, { 'rcarriga/nvim-dap-ui', config = true }, - { "mfussenegger/nvim-dap-python", config = true }, + { "mfussenegger/nvim-dap-python" }, + { "theHamsta/nvim-dap-virtual-text", config = true }, -------------------- -- Color schemes diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index b4e7ba6..7aa087b 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -26,11 +26,11 @@ unbind % # reload config file (change file location to your the tmux.conf you want to use) 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 -bind -n M-Right select-pane -R -bind -n M-Up select-pane -U -bind -n M-Down select-pane -D +# # switch panes using Alt-arrow without prefix +# bind -n M-Left select-pane -L +# bind -n M-Right select-pane -R +# bind -n M-Up select-pane -U +# bind -n M-Down select-pane -D # Shift + arrow key to move between windows. bind-key -n S-Left previous-window From 110f677334c5f60814e6996c3e8ea15eff0c1740 Mon Sep 17 00:00:00 2001 From: cmccay Date: Wed, 25 Jan 2023 12:52:24 -0600 Subject: [PATCH 10/17] alacritty colors --- alacritty/.config/alacritty/alacritty.yml | 35 ++--------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index 6396397..731d883 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -7,39 +7,8 @@ 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' +import: + - ~/.alacritty-colorscheme/themes/base16_default_dark.yaml # this stupid shit is needed because alacritty can't take the option key as Alt key_bindings: From 509080c35b494d36bb888073e1be6accf2a07b1d Mon Sep 17 00:00:00 2001 From: cmccay Date: Thu, 26 Jan 2023 09:24:31 -0600 Subject: [PATCH 11/17] move colors to init.lua --- nvim/.config/nvim/init.lua | 6 +++++- nvim/.config/nvim/lua/plugins/init.lua | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 363ec6c..fc2b94b 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -11,8 +11,12 @@ require("clint") -- loads lua/clint/init.lua require("lazy").setup( { spec = "plugins", - install = { colorscheme = { "gruvbox", } } + install = { colorscheme = { "gruvbox", "ayu", "melange", } } } ) -- loads each lua/plugin/* require('dap-python').setup('~/.virtualenvs/debugpy/bin/python') + +vim.opt.termguicolors = true +vim.cmd.colorscheme 'melange' + diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index 287f88a..fe9546b 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -36,6 +36,8 @@ return { -- Color schemes -------------------- + { "glepnir/oceanic-material" }, + { "savq/melange-nvim" }, { 'ayu-theme/ayu-vim' }, -- { 'morhetz/gruvbox' }, { 'ellisonleao/gruvbox.nvim' }, @@ -44,7 +46,6 @@ return { { 'rainux/vim-desert-warm-256' }, { 'ajmwagar/vim-deus' }, { "rebelot/kanagawa.nvim" }, - { "glepnir/oceanic-material" }, -------------------- -- Utility From 091726582df709184eb5a351756cc3c7fe566696 Mon Sep 17 00:00:00 2001 From: c Date: Fri, 27 Jan 2023 21:33:27 -0600 Subject: [PATCH 12/17] add i3 back wtf --- i3/.config/i3/config | 287 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 i3/.config/i3/config diff --git a/i3/.config/i3/config b/i3/.config/i3/config new file mode 100644 index 0000000..573814e --- /dev/null +++ b/i3/.config/i3/config @@ -0,0 +1,287 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font pango:monospace 8 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 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 + +# The combination of xss-lock, nm-applet and pactl is a popular choice, so +# they are included here as an example. Modify as you see fit. + +# 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 + +# NetworkManager is the most popular way to manage wireless networks on Linux, +# and nm-applet is a desktop environment-independent system tray GUI for it. +exec --no-startup-id nm-applet + +# Use pactl to adjust volume in PulseAudio. +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# 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 dmenu_run +# bindsym $mod+d exec "rofi -show run" + +# A more modern dmenu replacement is rofi: +# bindcode $mod+40 exec "rofi -modi drun,run -show drun" +# There also is i3-dmenu-desktop which only displays applications shipping a +# .desktop file. It is a wrapper around dmenu, so you need that installed. +# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +#bindsym $mod+l focus up +bindsym $mod+semicolon focus right + +# alternatively, 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 + +# move focused window +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon move right + +# alternatively, 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 + +# change container layout (stacked, tabbed, toggle split) +# bindsym $mod+s layout stacking +# bindsym $mod+w layout tabbed +# bindsym $mod+e layout toggle split + +# 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 + +# focus the child container +#bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. + +#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 "10:十" + +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 + +# set which programs open in which workspaces +# to find the class, run xprop in a terminal and click on a program +#assign [class="Alacritty"] $ws1 +assign [class="firefox"] $ws2 +assign [class="pycharm"] $ws3 +assign [class="Gimp"] $ws3 + +# these programs will float +for_window [class="kcalc"] floating enable + +# 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'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + 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 + + # same bindings, but for the arrow keys + 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" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) + +# bar color definitions +set $bar-text #ADF1D2 +set $bar-background #231c1c +set $bar-statusline #eeeeee +set $bar-separator #eeeeee +set $bar-focused_workspace #553555 +set $bar-inactive_workspace #755B69 + +#bar { +# position top +# strip_workspace_numbers yes +# status_command i3blocks +# output HDMI-0 +# output HDMI-1 +# font pango:Hack 10 +# +# colors { +# background $bar-background +# statusline $bar-statusline +# separator $bar-separator +# +# # class border background text +# focused_workspace $bar-focused_workspace $bar-focused_workspace $bar-text +# active_workspace $bar-inactive_workspace $bar-inactive_workspace $bar-text +# inactive_workspace #333333 #222222 #888888 +# urgent_workspace #2f343a #900000 #ffffff +# binding_mode #2f343a #900000 #ffffff +# } +#} + +# set background on startup +set $wallpaper ~/Pictures/wallpapers/rennaissance.jpg +exec --no-startup-id feh --bg-fill $wallpaper + +# turn picom on on start up +exec_always --no-startup-id picom & + +# turn off borders (required for i3-gaps) +for_window [class=".*"] border pixel 1 + +# gaps +gaps inner 10 + +# 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 #333333 +client.unfocused $bd-color #111111 #ffffff #333333 #333333 + +# 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_wallpaper.sh +bindsym $mod+x exec ~/.scripts/dmenu_shutdown.sh + +# common programs +bindsym $mod+Shift+w exec firefox +bindsym $mod+Shift+p exec pycharm +bindsym $mod+g exec gimp +bindsym $mod+m workspace $ws4; exec spotifyd; exec alacritty -e spt +bindsym $mod+Shift+m exec killall spt; exec killall spotifyd + +# polybar +exec_always --no-startup-id $HOME/.config/polybar/launch.sh From 882acad3a7aefe3e57092c43268bb3d2826d237e Mon Sep 17 00:00:00 2001 From: clint Date: Fri, 27 Jan 2023 21:53:59 -0600 Subject: [PATCH 13/17] i needed to move this down for some reason --- nvim/.config/nvim/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index fc2b94b..f119382 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -4,7 +4,6 @@ require("clint/lazy_bootstrap") -- bootstraps folke/lazy ----------------------------------------------[[ User Settings ]] -require("clint") -- loads lua/clint/init.lua ----------------------------------------------[[ Load Plugins ]] @@ -15,6 +14,7 @@ require("lazy").setup( } ) -- loads each lua/plugin/* +require("clint") -- loads lua/clint/init.lua require('dap-python').setup('~/.virtualenvs/debugpy/bin/python') vim.opt.termguicolors = true From 7c4ab28d2a9b746e137134f0ac428dd6976f36de Mon Sep 17 00:00:00 2001 From: clint Date: Sun, 29 Jan 2023 22:21:19 -0600 Subject: [PATCH 14/17] asdf --- nvim/.config/nvim/after/plugin/which-key.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/after/plugin/which-key.lua b/nvim/.config/nvim/after/plugin/which-key.lua index ad04b2d..9bf6e0e 100644 --- a/nvim/.config/nvim/after/plugin/which-key.lua +++ b/nvim/.config/nvim/after/plugin/which-key.lua @@ -20,6 +20,10 @@ wk.register({ f = "Git Files", b = "Git Blame", }, + r = { + name = "+repl", + p = "Run Python" + }, -- Misc c = "Change Color Scheme", y = "Yank to system clipboard", @@ -32,7 +36,7 @@ wk.register({ o = "Object Explorer", fo = "Format Current File", -- LSP related stuff - r = "Rename Object", + R = "Rename Object", K = "Hover", gd = "Go to definition", -- Debugging From b040b7fc1cae94b3895c405a08a208779f10b6f3 Mon Sep 17 00:00:00 2001 From: c Date: Sun, 19 Mar 2023 21:52:14 -0500 Subject: [PATCH 15/17] toggleterm --- nvim/.config/nvim/lua/clint/keybindings.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nvim/.config/nvim/lua/clint/keybindings.lua b/nvim/.config/nvim/lua/clint/keybindings.lua index c890541..5242aae 100644 --- a/nvim/.config/nvim/lua/clint/keybindings.lua +++ b/nvim/.config/nvim/lua/clint/keybindings.lua @@ -80,3 +80,6 @@ keymap('n', '', ":lua require'dap'.continue()", default_ops) keymap('n', '', ":lua require'dap'.step_into()", default_ops) keymap('n', '', ":lua require'dap'.step_over()", default_ops) keymap('n', 'D', ":lua require'dapui'.toggle()", default_ops) + +-- REPL +keymap('v', 'x', ':ToggleTermSendVisualLines', default_ops) From 0aaf474e210bb3723f018a4c005797e79202114d Mon Sep 17 00:00:00 2001 From: c Date: Wed, 22 Mar 2023 21:37:23 -0500 Subject: [PATCH 16/17] merge this SHIT --- nvim/.config/nvim/lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index fe9546b..d6ef5d1 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -181,5 +181,5 @@ return { }, -- Scroll bar - { 'petertriho/nvim-scrollbar', config = true }, + -- { 'petertriho/nvim-scrollbar', config = true }, } From 85d01961d8f7b4d406121865ab85cdc7f664e096 Mon Sep 17 00:00:00 2001 From: cmccay Date: Wed, 22 Mar 2023 21:41:50 -0500 Subject: [PATCH 17/17] merge please --- alacritty/.config/alacritty/alacritty.yml | 2 +- nvim/.config/nvim/ftplugin/python.lua | 3 +++ nvim/.config/nvim/lua/clint/colorscheme.lua | 5 +++-- nvim/.config/nvim/lua/plugins/init.lua | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index cf6cc58..3972bb9 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -2,7 +2,7 @@ window: opacity: 1.0 font: - size: 14 + size: 9 normal: family: FiraCode Nerd Font style: Regular diff --git a/nvim/.config/nvim/ftplugin/python.lua b/nvim/.config/nvim/ftplugin/python.lua index 0a6e796..846f1e7 100644 --- a/nvim/.config/nvim/ftplugin/python.lua +++ b/nvim/.config/nvim/ftplugin/python.lua @@ -23,3 +23,6 @@ keymap('v', '-', 'klx', default_ops) -- Indenting keymap('v', '<', '', '>gv', default_ops) + +-- Toggle Term REPL stuff +keymap('n', 'x', 'ToggleTermSendCurrentLine', default_ops) diff --git a/nvim/.config/nvim/lua/clint/colorscheme.lua b/nvim/.config/nvim/lua/clint/colorscheme.lua index f0e511a..cb5e131 100644 --- a/nvim/.config/nvim/lua/clint/colorscheme.lua +++ b/nvim/.config/nvim/lua/clint/colorscheme.lua @@ -1,7 +1,8 @@ -- general theme -vim.cmd("colorscheme kanagawa") +-- vim.opt.termguicolors = true +-- vim.cmd.colorscheme 'ayu' --- -- 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") diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index fe9546b..d552d03 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -139,7 +139,7 @@ return { version = "*", config = { open_mapping = [[]], - -- direction = 'float' + direction = 'horizontal' } },