restructure nvim folders

This commit is contained in:
c 2022-12-17 16:57:09 -06:00
parent f701a23e2e
commit 22a4157ac8
20 changed files with 772 additions and 96 deletions

View File

@ -1,9 +1,9 @@
window: window:
opacity: 0.85 opacity: 0.9
font: font:
normal: normal:
family: monospace family: FiraCode Nerd Font
style: Regular style: Regular
# Colors (Oxide) # Colors (Oxide)

View File

@ -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 <CR>"),
dashboard.button("e", " New file", ":ene <BAR> startinsert <CR>"),
dashboard.button("p", " Find project", ":Telescope projects <CR>"),
dashboard.button("r", " Recently used files", ":Telescope oldfiles <CR>"),
dashboard.button("t", " Find text", ":Telescope live_grep <CR>"),
dashboard.button("c", " Configuration", ":e ~/.config/nvim/init.lua <CR>"),
dashboard.button("q", " Quit Neovim", ":qa<CR>"),
}
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)

View File

@ -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,
}
}

View File

@ -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")

View File

@ -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,
})

View File

@ -2,6 +2,7 @@ local keymap = vim.api.nvim_set_keymap
local default_ops = { noremap = true, silent = true } local default_ops = { noremap = true, silent = true }
local settings = vim.opt local settings = vim.opt
vim.g.mapleader = '\\'
-- Set up -- Set up
settings.colorcolumn = "80" settings.colorcolumn = "80"
@ -12,3 +13,13 @@ keymap('n', '<F5>', ":w<CR>:exec '!clear;python' shellescape(@%, 1)<CR>", defaul
-- Handy stuff -- Handy stuff
keymap('n', '<Leader>m', 'iif __name__ == "__main__":<Esc>o<Tab>main()<Esc>o<Bs><Bs><Esc>', default_ops) keymap('n', '<Leader>m', 'iif __name__ == "__main__":<Esc>o<Tab>main()<Esc>o<Bs><Bs><Esc>', default_ops)
-- keymap('n', '<Leader>f', 'idef ():<Esc>bi', default_ops) -- keymap('n', '<Leader>f', 'idef ():<Esc>bi', default_ops)
-- Comment/Uncomment
keymap('n', '<Leader>\\', '0i# <Esc>', default_ops)
keymap('n', '<Leader>-', '0xx', default_ops)
keymap('v', '<Leader>\\', '<C-v>kI# <Esc>', default_ops)
keymap('v', '<Leader>-', '<C-v>klx<Esc>', default_ops)
-- Indenting
keymap('v', '<', '<gv', default_ops)
keymap('v', '>', '>gv', default_ops)

View File

@ -1,5 +1,2 @@
require("plugins") require("clint")
require("keybindings")
require("settings")
require("colorscheme")
require("lsp")

View File

@ -2,9 +2,11 @@
-- vim.cmd("colorscheme ayu") -- vim.cmd("colorscheme ayu")
-- vim.cmd("let ayucolor='mirage'") -- vim.cmd("let ayucolor='mirage'")
-- vim.cmd("colorscheme gruvbox") -- vim.cmd("colorscheme gruvbox")
-- vim.cmd("colorscheme tender") vim.cmd("colorscheme deus")
-- vim.cmd("colorscheme railscasts") -- vim.cmd("colorscheme railscasts")
-- vim.cmd("colorscheme desert-warm-256") -- 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 Normal ctermbg=none")
vim.cmd("highlight NonText ctermbg=none") vim.cmd("highlight NonText ctermbg=none")

View File

@ -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({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = 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' }
})
})

View File

@ -0,0 +1,5 @@
require("clint.plugins")
require("clint.keybindings")
require("clint.settings")
require("clint.colorscheme")
require("clint.lsp")

View File

@ -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', '<Esc>', default_ops)
-- Delete single character without copying into register
keymap("n", "x", '"_x', default_ops)
-- Window management
keymap("n", "<leader>sv", "<C-w>v", default_ops)
keymap("n", "<leader>sh", "<C-w>s", default_ops)
keymap("n", "<leader>se", "<C-w>=", default_ops)
keymap("n", "<leader>sx", ":close<CR>", default_ops)
-- Save, Save/Quit
keymap('n', '<F1>', ':w<CR>', default_ops)
keymap('n', '<F2>', ':wq<CR>', default_ops)
-- Tab through open buffers
keymap('n', '[b', ':bp<CR>', default_ops)
keymap('n', ']b', ':bn<CR>', default_ops)
-- Enter lines
keymap('n', '<Enter>', 'o<Esc>', default_ops)
keymap('n', '<s-Enter>', 'O<Esc>', default_ops)
-- Folding
keymap('n', '<space>', 'za', default_ops)
-- Telescope stuff
keymap('n', '<Leader>ff', ':Telescope find_files hidden=true<CR>', default_ops)
keymap('n', '<Leader>gf', ':Telescope git_files<CR>', default_ops)
keymap('n', '<Leader>lg', ':Telescope live_grep<CR>', default_ops)
keymap('n', '<Leader>d', ':Telescope diagnostics<CR>', default_ops)
keymap('n', '<Leader>h', ':Telescope neoclip<CR>', default_ops)
keymap('n', '<Leader>fb', ':Telescope file_browser hidden=true<CR>', default_ops)
-- Buffers
keymap('n', '<Leader>b', ':JABSOpen<CR>', default_ops)
-- Shift up and down
keymap("v", "J", ":m '>+1<CR>gv=gv", default_ops)
keymap("v", "K", ":m '<-2<CR>gv=gv", default_ops)
-- Keep centered
keymap("n", "<C-d>", "<C-d>zz", default_ops)
keymap("n", "<C-u>", "<C-u>zz", default_ops)
keymap("n", "n", "nzzzv", default_ops)
keymap("n", "N", "Nzzzv", default_ops)
-- Yank to system clipboard
keymap("n", "<leader>y", [["+y]], default_ops)
keymap("v", "<leader>y", [["+y]], default_ops)
keymap("n", "<leader>Y", [["+Y]], default_ops)
-- Replace the word the cursor is currently on
keymap("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], default_ops)

View File

@ -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", "<Leader>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({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = 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' }
})
})

View File

@ -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
)

View File

@ -4,9 +4,12 @@ local settings = vim.opt
settings.relativenumber = true settings.relativenumber = true
settings.number = true settings.number = true
-- Scrolling
settings.scrolloff = 10
-- Searching -- Searching
settings.incsearch = true settings.incsearch = true
settings.hls = true settings.hls = false
-- Indentation (move to python specific file) -- Indentation (move to python specific file)
settings.tabstop = 4 settings.tabstop = 4
@ -14,7 +17,6 @@ settings.shiftwidth = 4
settings.softtabstop = 4 settings.softtabstop = 4
settings.autoindent = true settings.autoindent = true
settings.smartindent = true settings.smartindent = true
settings.colorcolumn = "80"
-- Folding -- Folding
settings.foldmethod = "indent" settings.foldmethod = "indent"
@ -27,3 +29,7 @@ vim.g.slime_default_config = {
socket_name = vim.api.nvim_eval('get(split($TMUX, ","), 0)'), socket_name = vim.api.nvim_eval('get(split($TMUX, ","), 0)'),
target_pane = '{bottom}', target_pane = '{bottom}',
} }
-- Airline
vim.g.airline_powerline_fonts = 1
vim.g.airline_extensions_tabline_enabled = 1

View File

@ -1,22 +0,0 @@
local keymap = vim.api.nvim_set_keymap
local default_ops = { noremap = true, silent = true }
-- Save, Save/Quit
keymap('n', '<F1>', ':w<CR>', default_ops)
keymap('n', '<F2>', ':wq<CR>', default_ops)
-- Tab through open buffers
keymap('n', '[b', ':bp<CR>', default_ops)
keymap('n', ']b', ':bn<CR>', default_ops)
-- Enter lines
keymap('n', '<Enter>', 'o<Esc>', default_ops)
keymap('n', '<s-Enter>', 'O<Esc>', default_ops)
-- Folding
keymap('n', '<space>', 'za', default_ops)
-- keymap('n', '<space>', 'za', default_ops)
-- NERDTree stuff
keymap('n', '<F4>', ':NERDTreeToggle<CR>', default_ops)

View File

@ -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
}

View File

@ -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)

View File

@ -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

View File

@ -1,17 +1,22 @@
# general # general
#
set -g default-terminal "screen-256color" set -g default-terminal "screen-256color"
# left status # left status
set-window-option -g status-left " #S " set-window-option -g status-left " (( #S )) "
set-window-option -g status-left-style "fg=green bg=black" set-window-option -g status-left-style "fg=blue bg=black"
set-window-option -g status-left-length 30
# right status # right status
set-window-option -g status-right " %I:%M%p %d-%b-%y " 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 " set-window-option -g window-status-format " #I: #W "
# active windows # active windows
set-window-option -g window-status-current-format " #I: #W " 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

View File

@ -5,6 +5,9 @@ unbind C-b
set-option -g prefix '`' set-option -g prefix '`'
bind-key '`' send-prefix bind-key '`' send-prefix
# mouse scrolling
setw -g mouse on
# 0 is too far from Ctrl-a. # 0 is too far from Ctrl-a.
set -g base-index 1 set -g base-index 1
@ -21,7 +24,7 @@ unbind '"'
unbind % unbind %
# reload config file (change file location to your the tmux.conf you want to use) # 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 # switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L 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-Left previous-window
bind-key -n S-Right next-window bind-key -n S-Right next-window
# Faster Esc
set-option -sg escape-time 10
source ~/.config/tmux/statusline.conf source ~/.config/tmux/statusline.conf