nvim: nasty, mid-rewrite update
This commit is contained in:
@@ -2,8 +2,218 @@
|
|||||||
-- License: WTFPL
|
-- License: WTFPL
|
||||||
-- Description: Personal neovim configuration
|
-- Description: Personal neovim configuration
|
||||||
|
|
||||||
|
local cmd, fn, opt, g = vim.cmd, vim.fn, vim.opt, vim.g
|
||||||
|
local command = vim.api.nvim_create_user_command
|
||||||
|
|
||||||
|
require('impatient') -- Should be at the top
|
||||||
|
require('filetypes').config()
|
||||||
|
|
||||||
|
cmd [[packadd packer.nvim]]
|
||||||
|
local packer = require 'packer'
|
||||||
|
local use = packer.use
|
||||||
|
|
||||||
|
packer.startup(function()
|
||||||
|
-- Lua
|
||||||
|
use { 'wbthomason/packer.nvim', opt = true }
|
||||||
|
use 'lewis6991/impatient.nvim'
|
||||||
|
use 'nvim-lua/plenary.nvim'
|
||||||
|
use { 'shaunsingh/nord.nvim',
|
||||||
|
config = function()
|
||||||
|
require('plugins/nord').config()
|
||||||
|
end,
|
||||||
|
setup = function()
|
||||||
|
require('plugins/nord').setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
run = ':TSUpdate',
|
||||||
|
event = { 'BufRead', 'BufNewFile' },
|
||||||
|
config = function()
|
||||||
|
require('plugins/treesitter').config()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
use 'nvim-tree/nvim-tree.lua'
|
||||||
|
use 'numtostr/comment.nvim'
|
||||||
|
use 'ellisonleao/glow.nvim'
|
||||||
|
|
||||||
|
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', cond = fn.executable "make" == 1 }
|
||||||
|
use { 'nvim-telescope/telescope.nvim',
|
||||||
|
module = 'telescope',
|
||||||
|
requires = { 'nvim-lua/plenary.nvim' },
|
||||||
|
config = function()
|
||||||
|
require('plugins/telescope').config()
|
||||||
|
end,
|
||||||
|
setup = function()
|
||||||
|
require('plugins/telescope').setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
use "jose-elias-alvarez/null-ls.nvim"
|
||||||
|
|
||||||
|
|
||||||
|
-- Vimscript
|
||||||
|
use 'junegunn/vim-easy-align'
|
||||||
|
use 'christoomey/vim-tmux-navigator'
|
||||||
|
use 'airblade/vim-gitgutter'
|
||||||
|
|
||||||
|
-- tpope
|
||||||
|
use 'tpope/vim-surround'
|
||||||
|
use 'tpope/vim-fugitive'
|
||||||
|
use 'tpope/vim-rails'
|
||||||
|
use 'tpope/vim-rhubarb'
|
||||||
|
use 'tpope/vim-repeat'
|
||||||
|
|
||||||
|
-- tests
|
||||||
|
use 'vim-test/vim-test'
|
||||||
|
use 'benmills/vimux'
|
||||||
|
|
||||||
|
use 'dyng/ctrlsf.vim'
|
||||||
|
|
||||||
|
use 'AndrewRadev/splitjoin.vim'
|
||||||
|
|
||||||
|
use {
|
||||||
|
'VonHeikemen/lsp-zero.nvim',
|
||||||
|
requires = {
|
||||||
|
-- LSP Support
|
||||||
|
{'neovim/nvim-lspconfig'},
|
||||||
|
{'williamboman/mason.nvim'},
|
||||||
|
{'williamboman/mason-lspconfig.nvim'},
|
||||||
|
|
||||||
|
-- Autocompletion
|
||||||
|
{'hrsh7th/nvim-cmp'},
|
||||||
|
{'hrsh7th/cmp-buffer'},
|
||||||
|
{'hrsh7th/cmp-path'},
|
||||||
|
{'saadparwaiz1/cmp_luasnip'},
|
||||||
|
{'hrsh7th/cmp-nvim-lsp'},
|
||||||
|
{'hrsh7th/cmp-nvim-lua'},
|
||||||
|
|
||||||
|
-- Snippets
|
||||||
|
{'L3MON4D3/LuaSnip'},
|
||||||
|
{'rafamadriz/friendly-snippets'},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
use { "dstein64/vim-startuptime", cmd = "StartupTime" }
|
||||||
|
end)
|
||||||
|
|
||||||
require('builtins')
|
require('builtins')
|
||||||
require('filetypes')
|
require 'plugins/gitgutter'
|
||||||
require('settings')
|
require 'plugins/lsp'
|
||||||
require('plugins')
|
require 'plugins/nord'
|
||||||
|
require 'plugins/nvim-tree'
|
||||||
|
require 'plugins/comment'
|
||||||
|
require 'plugins/mason'
|
||||||
|
require 'plugins/null-ls'
|
||||||
|
require 'plugins/telescope'
|
||||||
|
|
||||||
|
cmd('au TextYankPost * lua vim.highlight.on_yank { timeout = 250 }')
|
||||||
|
|
||||||
|
g.ruby_host_prog = 'asdf exec neovim-ruby-host'
|
||||||
|
|
||||||
|
opt.smartindent = true -- Autoindenting when starting a new line
|
||||||
|
opt.completeopt = {'menu', 'menuone', 'noselect'}
|
||||||
|
opt.tabstop = 2 -- Tab counts as 2 columns
|
||||||
|
opt.shiftwidth = 2 -- Numbers of spaces to (auto)indent
|
||||||
|
opt.expandtab = true -- Tabs to spaces
|
||||||
|
opt.clipboard = 'unnamedplus' -- Share clipboard with the OS
|
||||||
|
opt.number = true -- Display line numbers
|
||||||
|
opt.fillchars = {
|
||||||
|
vert = '▕', -- alternatives │
|
||||||
|
eob = ' ', -- suppress ~ at EndOfBuffer
|
||||||
|
msgsep = '‾',
|
||||||
|
diff = '⣿',
|
||||||
|
fold = ' ',
|
||||||
|
foldopen = '▾',
|
||||||
|
foldsep = '│',
|
||||||
|
foldclose = '▸',
|
||||||
|
}
|
||||||
|
opt.synmaxcol = 500 -- Do not try to highlight lines longer than 500 characters
|
||||||
|
opt.lazyredraw = true -- Do not redraw while running macros
|
||||||
|
opt.showmatch = true -- Show matching braces
|
||||||
|
opt.matchtime = 2 -- Show matching braces for 2 tenths of second
|
||||||
|
opt.showmode = true -- Shows when you are in insert mode
|
||||||
|
opt.title = true -- Show title in console status bar
|
||||||
|
opt.laststatus = 3 -- Single status line
|
||||||
|
opt.wrap = false -- Dont wrap lines
|
||||||
|
opt.scrolloff = 5 -- Keep 5 rows on the screen when scrolling
|
||||||
|
opt.sidescrolloff = 15 -- Horizontal scrolloff
|
||||||
|
opt.visualbell = false -- No visual bell
|
||||||
|
opt.backup = false -- No backups
|
||||||
|
opt.writebackup = false -- No backups
|
||||||
|
opt.swapfile = false -- No backups
|
||||||
|
opt.mouse = 'a' -- Support mouse (for proper mouse highlight)
|
||||||
|
opt.list = true -- List mode
|
||||||
|
opt.listchars = { trail = '·', tab = '->' }
|
||||||
|
opt.timeoutlen = 1000 -- Delay for mappings
|
||||||
|
opt.ttimeoutlen = 0 -- Delay between modes
|
||||||
|
opt.shellcmdflag = '-ilc' -- Enables aliases from .bashrc in :! commands
|
||||||
|
opt.termguicolors = true -- 24-bit RGB color
|
||||||
|
|
||||||
|
|
||||||
|
if vim.fn.executable('rg') > 0 then
|
||||||
|
vim.o.grepprg = [[rg --glob "!.git" --no-heading --vimgrep --follow $*]]
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Use in vertical diff mode, blank lines to keep sides aligned, Ignore whitespace changes
|
||||||
|
opt.diffopt = vim.opt.diffopt
|
||||||
|
+ {
|
||||||
|
'vertical',
|
||||||
|
'iwhite',
|
||||||
|
'hiddenoff',
|
||||||
|
'foldcolumn:0',
|
||||||
|
'context:4',
|
||||||
|
'algorithm:histogram',
|
||||||
|
'indent-heuristic',
|
||||||
|
}
|
||||||
|
|
||||||
|
opt.shortmess = {
|
||||||
|
t = true, -- truncate file messages at start
|
||||||
|
A = true, -- ignore annoying swap file messages
|
||||||
|
o = true, -- file-read message overwrites previous
|
||||||
|
O = true, -- file-read message overwrites previous
|
||||||
|
T = true, -- truncate non-file messages in middle
|
||||||
|
f = true, -- (file x of x) instead of just (x of x
|
||||||
|
F = true, -- Don't give file info when editing a file, NOTE: this breaks autocommand messages
|
||||||
|
s = true,
|
||||||
|
I = true, -- disable welcome message (:intro)
|
||||||
|
a = true, -- shortmess for everything
|
||||||
|
c = true,
|
||||||
|
W = true, -- Don't show [w] or written when writing
|
||||||
|
}
|
||||||
|
|
||||||
|
-- ignore when autocompleting
|
||||||
|
opt.wildignore = {
|
||||||
|
'*.aux', '*.out', '*.toc', '*.o', '*.obj',
|
||||||
|
'*.dll', '*.jar', '*.pyc', '*.rbc', '*.class',
|
||||||
|
'*.gif', '*.ico', '*.jpg', '*.jpeg', '*.png',
|
||||||
|
'*.avi', '*.wav', '*.*~', '*~ ', '*.swp',
|
||||||
|
'.lock', '.DS_Store', 'tags.lock'
|
||||||
|
}
|
||||||
|
|
||||||
|
-- vim-test
|
||||||
|
g['test#strategy'] = 'neovim'
|
||||||
|
|
||||||
|
-- CtrlSF
|
||||||
|
g.ctrlsf_ackprg = 'rg'
|
||||||
|
g.ctrlsf_regex_pattern = 1
|
||||||
|
g.ctrlsf_case_sensitive = 'smart'
|
||||||
|
g.ctrlsf_default_root = 'project'
|
||||||
|
g.ctrlsf_context = '-B 1 -A 1'
|
||||||
|
g.ctrlsf_position = 'bottom'
|
||||||
|
g.ctrlsf_winsize = '40%'
|
||||||
|
g.ctrlsf_mapping = {
|
||||||
|
next = 'n',
|
||||||
|
prev = 'N',
|
||||||
|
}
|
||||||
|
|
||||||
|
local function trim_trailing_whitespace()
|
||||||
|
local pos = vim.api.nvim_win_get_cursor(0)
|
||||||
|
vim.cmd [[silent keepjumps keeppatterns %s/\s\+$//e]]
|
||||||
|
vim.api.nvim_win_set_cursor(0, pos)
|
||||||
|
end
|
||||||
|
command('TrimWhitespace', trim_trailing_whitespace, {})
|
||||||
|
|
||||||
|
-- vim.cmd("set shell='bash -l'")
|
||||||
|
|
||||||
require('mappings')
|
require('mappings')
|
||||||
|
|||||||
@@ -1,23 +1,22 @@
|
|||||||
if not vim.filetype then
|
local M = {}
|
||||||
return
|
|
||||||
|
function M.config()
|
||||||
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
yml = 'yaml',
|
||||||
|
docker = 'dockerfile',
|
||||||
|
},
|
||||||
|
filename = {
|
||||||
|
['.gitignore'] = 'conf',
|
||||||
|
Podfile = 'ruby',
|
||||||
|
Brewfile = 'ruby',
|
||||||
|
Vagrantfile = 'ruby',
|
||||||
|
},
|
||||||
|
pattern = {
|
||||||
|
['*.gradle'] = 'groovy',
|
||||||
|
['*.env.*'] = 'env',
|
||||||
|
},
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- vim.g.did_load_filetypes = 0 -- deactivate vim based filetype detection
|
return M
|
||||||
-- vim.g.do_filetype_lua = 1 -- enable lua ft detection
|
|
||||||
--
|
|
||||||
-- vim.filetype.add({
|
|
||||||
-- extension = {
|
|
||||||
-- -- yml = 'yaml',
|
|
||||||
-- docker = 'dockerfile',
|
|
||||||
-- },
|
|
||||||
-- filename = {
|
|
||||||
-- ['.gitignore'] = 'conf',
|
|
||||||
-- Podfile = 'ruby',
|
|
||||||
-- Brewfile = 'ruby',
|
|
||||||
-- Vagrantfile = 'ruby',
|
|
||||||
-- },
|
|
||||||
-- pattern = {
|
|
||||||
-- ['*.gradle'] = 'groovy',
|
|
||||||
-- ['*.env.*'] = 'env',
|
|
||||||
-- },
|
|
||||||
-- })
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ nmap('L', '$')
|
|||||||
nmap('J', 'mzJ`z')
|
nmap('J', 'mzJ`z')
|
||||||
nmap('K', '<Nop>')
|
nmap('K', '<Nop>')
|
||||||
nmap('gQ', '<Nop>')
|
nmap('gQ', '<Nop>')
|
||||||
|
nmap('vv', ':vs<CR>')
|
||||||
|
|
||||||
-- Tabs
|
-- Tabs
|
||||||
nmap('<leader>t', ':tabnew<CR>')
|
nmap('<leader>t', ':tabnew<CR>')
|
||||||
@@ -48,12 +49,6 @@ map('v', 'K', ':m \'<-2<CR>gv=gv')
|
|||||||
map('v', '<', '<gv')
|
map('v', '<', '<gv')
|
||||||
map('v', '>', '>gv')
|
map('v', '>', '>gv')
|
||||||
|
|
||||||
-- Telescope
|
|
||||||
nmap('<leader>ff', ':lua require("telescope.builtin").find_files({ hidden = true })<CR>')
|
|
||||||
-- TODO: change to Telescope
|
|
||||||
-- nmap('<leader>ft', ':Files ~/Tmp<CR>')
|
|
||||||
-- nmap('<leader>fo', ":call fzf#run(fzf#wrap(fzf#vim#with_preview({ 'source': 'fd . --type f --extension=md --follow --exclude .git ~/Syncthing/Obsidian/Personal' })))<CR>", { silent = true })
|
|
||||||
|
|
||||||
-- vim-easy-align
|
-- vim-easy-align
|
||||||
map('x', 'ga', ':EasyAlign<CR>') -- TODO: this should allow for gaip, but does not
|
map('x', 'ga', ':EasyAlign<CR>') -- TODO: this should allow for gaip, but does not
|
||||||
map('v', 'ga', ':EasyAlign<CR>')
|
map('v', 'ga', ':EasyAlign<CR>')
|
||||||
@@ -76,8 +71,11 @@ nmap('<leader>gb',':Git blame<CR>')
|
|||||||
nmap('<leader>a', ':A<CR>')
|
nmap('<leader>a', ':A<CR>')
|
||||||
|
|
||||||
-- test
|
-- test
|
||||||
nmap('<leader>r', ':TestFile<CR>')
|
-- nmap('<leader>r', ':TestFile<CR>')
|
||||||
nmap('<leader>R', ':TestSuite<CR>')
|
-- nmap('<leader>R', ':TestSuite<CR>')
|
||||||
|
|
||||||
-- CtrlSF
|
-- CtrlSF
|
||||||
nmap('<C-f>', '<Plug>CtrlSFPrompt')
|
nmap('<C-f>', '<Plug>CtrlSFPrompt')
|
||||||
|
|
||||||
|
-- trim whitespace
|
||||||
|
nmap('<leader>W', ':TrimWhitespace<CR>')
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ cmp.setup({
|
|||||||
|
|
||||||
-- Set up lspconfig.
|
-- Set up lspconfig.
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
require('lspconfig')['solargraph'].setup({ capabilities = capabilities })
|
-- require('lspconfig')['solargraph'].setup({ capabilities = capabilities })
|
||||||
|
|
||||||
-- require("luasnip.loaders.from_lua").lazy_load()
|
-- require("luasnip.loaders.from_lua").lazy_load()
|
||||||
|
|
||||||
|
|||||||
@@ -1,84 +0,0 @@
|
|||||||
local g = vim.g -- a table to access global variables
|
|
||||||
|
|
||||||
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
|
|
||||||
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
|
||||||
vim.fn.execute('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path)
|
|
||||||
end
|
|
||||||
|
|
||||||
require('packer').startup(function()
|
|
||||||
use 'wbthomason/packer.nvim'
|
|
||||||
use 'shaunsingh/nord.nvim'
|
|
||||||
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
|
|
||||||
use 'tpope/vim-surround'
|
|
||||||
use { 'junegunn/fzf', run = 'cd ~/.fzf && ./install --all' }
|
|
||||||
use 'junegunn/fzf.vim'
|
|
||||||
use 'junegunn/vim-easy-align'
|
|
||||||
use 'christoomey/vim-tmux-navigator'
|
|
||||||
use 'airblade/vim-gitgutter'
|
|
||||||
use 'tpope/vim-repeat'
|
|
||||||
use 'nvim-tree/nvim-tree.lua'
|
|
||||||
use 'numtostr/comment.nvim'
|
|
||||||
use 'ellisonleao/glow.nvim'
|
|
||||||
|
|
||||||
-- Snippets
|
|
||||||
use 'L3MON4D3/LuaSnip'
|
|
||||||
use 'hrsh7th/nvim-cmp'
|
|
||||||
use 'hrsh7th/cmp-nvim-lsp'
|
|
||||||
use 'saadparwaiz1/cmp_luasnip'
|
|
||||||
use "rafamadriz/friendly-snippets"
|
|
||||||
|
|
||||||
use 'neovim/nvim-lspconfig'
|
|
||||||
|
|
||||||
-- tpope
|
|
||||||
use 'tpope/vim-fugitive'
|
|
||||||
use 'tpope/vim-rails'
|
|
||||||
use 'tpope/vim-rhubarb'
|
|
||||||
|
|
||||||
-- tests
|
|
||||||
use 'vim-test/vim-test'
|
|
||||||
use 'benmills/vimux'
|
|
||||||
|
|
||||||
use 'dyng/ctrlsf.vim'
|
|
||||||
|
|
||||||
-- Fuzzy Finder Algorithm which requires local dependencies to be built. Only load if `make` is available
|
|
||||||
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', cond = vim.fn.executable "make" == 1 }
|
|
||||||
use { 'nvim-telescope/telescope.nvim', branch = '0.1.x', requires = { 'nvim-lua/plenary.nvim' } }
|
|
||||||
|
|
||||||
use "williamboman/mason.nvim"
|
|
||||||
use "WhoIsSethDaniel/mason-tool-installer.nvim"
|
|
||||||
use "jose-elias-alvarez/null-ls.nvim"
|
|
||||||
use({
|
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
requires = {
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
}
|
|
||||||
})
|
|
||||||
use 'AndrewRadev/splitjoin.vim'
|
|
||||||
end)
|
|
||||||
|
|
||||||
require 'plugins/treesitter'
|
|
||||||
require 'plugins/gitgutter'
|
|
||||||
require 'plugins/lsp'
|
|
||||||
require 'plugins/cmp'
|
|
||||||
require 'plugins/nord'
|
|
||||||
require 'plugins/nvim-tree'
|
|
||||||
require 'plugins/comment'
|
|
||||||
require 'plugins/mason'
|
|
||||||
require 'plugins/null-ls'
|
|
||||||
require 'plugins/telescope'
|
|
||||||
|
|
||||||
-- vim-test
|
|
||||||
g['test#strategy'] = 'vimux'
|
|
||||||
|
|
||||||
-- CtrlSF
|
|
||||||
g.ctrlsf_ackprg = 'rg'
|
|
||||||
g.ctrlsf_regex_pattern = 1
|
|
||||||
g.ctrlsf_case_sensitive = 'smart'
|
|
||||||
g.ctrlsf_default_root = 'project'
|
|
||||||
g.ctrlsf_context = '-B 1 -A 1'
|
|
||||||
g.ctrlsf_position = 'bottom'
|
|
||||||
g.ctrlsf_winsize = '40%'
|
|
||||||
g.ctrlsf_mapping = {
|
|
||||||
next = 'n',
|
|
||||||
prev = 'N',
|
|
||||||
}
|
|
||||||
@@ -1,47 +1,111 @@
|
|||||||
require("mason-lspconfig").setup()
|
-- local M = {}
|
||||||
local lspconfig = require('lspconfig')
|
--
|
||||||
lspconfig.ansiblels.setup({})
|
-- function M.config()
|
||||||
lspconfig.bashls.setup({})
|
-- local lspconfig = require('lspconfig')
|
||||||
lspconfig.dockerls.setup({})
|
--
|
||||||
lspconfig.gopls.setup({})
|
-- lspconfig.ansiblels.setup({})
|
||||||
lspconfig.jsonls.setup({})
|
-- lspconfig.bashls.setup({})
|
||||||
lspconfig.solargraph.setup({})
|
-- lspconfig.dockerls.setup({})
|
||||||
lspconfig.marksman.setup({})
|
-- lspconfig.gopls.setup({})
|
||||||
lspconfig.terraformls.setup({})
|
-- lspconfig.jsonls.setup({})
|
||||||
lspconfig.vimls.setup({})
|
-- lspconfig.solargraph.setup({})
|
||||||
lspconfig.pylsp.setup({})
|
--
|
||||||
lspconfig.yamlls.setup({})
|
-- -- local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
-- -- require('lspconfig')['solargraph'].setup({ capabilities = capabilities })
|
||||||
|
--
|
||||||
|
-- lspconfig.marksman.setup({})
|
||||||
|
-- lspconfig.terraformls.setup({})
|
||||||
|
-- lspconfig.vimls.setup({})
|
||||||
|
-- lspconfig.pylsp.setup({})
|
||||||
|
-- lspconfig.yamlls.setup({
|
||||||
|
-- settings = {
|
||||||
|
-- yaml = {
|
||||||
|
-- format = {
|
||||||
|
-- enable = true,
|
||||||
|
-- singleQuote = true
|
||||||
|
-- }
|
||||||
|
-- }
|
||||||
|
-- }
|
||||||
|
-- })
|
||||||
|
--
|
||||||
|
-- require("mason").setup({})
|
||||||
|
-- require("mason-lspconfig").setup()
|
||||||
|
-- require("mason-tool-installer").setup({
|
||||||
|
-- -- https://github.com/williamboman/mason-lspconfig.nvim/blob/main/doc/server-mapping.md
|
||||||
|
-- ensure_installed = { "bash-language-server", "black", "dockerfile-language-server",
|
||||||
|
-- "isort", "json-lsp", "jsonlint", "lua-language-server", "marksman", "prettierd",
|
||||||
|
-- "python-lsp-server", "rubocop", "shfmt", "solargraph", "terraform-ls",
|
||||||
|
-- "vim-language-server", "yaml-language-server",
|
||||||
|
-- },
|
||||||
|
-- auto_update = true,
|
||||||
|
-- run_on_start = true
|
||||||
|
-- })
|
||||||
|
--
|
||||||
|
-- -- Provide settings that should only apply to the "sumneko_lua" server
|
||||||
|
-- local lua_runtime_path = vim.split(package.path, ';')
|
||||||
|
-- table.insert(lua_runtime_path, "lua/?.lua")
|
||||||
|
-- table.insert(lua_runtime_path, "lua/?/init.lua")
|
||||||
|
-- table.insert(lua_runtime_path, vim.fn.stdpath('config') .. "lua/?.lua")
|
||||||
|
--
|
||||||
|
-- lspconfig.sumneko_lua.setup({
|
||||||
|
-- settings = {
|
||||||
|
-- Lua = {
|
||||||
|
-- runtime = {
|
||||||
|
-- -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||||
|
-- version = 'LuaJIT',
|
||||||
|
-- -- Setup your lua path
|
||||||
|
-- path = lua_runtime_path,
|
||||||
|
-- },
|
||||||
|
-- format = {
|
||||||
|
-- enable = true,
|
||||||
|
-- defaultConfig = {
|
||||||
|
-- keep_one_space_between_table_and_bracket = "false",
|
||||||
|
-- }
|
||||||
|
-- },
|
||||||
|
-- diagnostics = {
|
||||||
|
-- -- Get the language server to recognize the `vim` global
|
||||||
|
-- globals = {'vim'},
|
||||||
|
-- ["codestyle-check"] = "Any",
|
||||||
|
-- },
|
||||||
|
-- -- Do not send telemetry data containing a randomized but unique identifier
|
||||||
|
-- telemetry = {
|
||||||
|
-- enable = false,
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
-- })
|
||||||
|
-- end
|
||||||
|
|
||||||
-- Provide settings that should only apply to the "sumneko_lua" server
|
|
||||||
local lua_runtime_path = vim.split(package.path, ';')
|
|
||||||
table.insert(lua_runtime_path, "lua/?.lua")
|
|
||||||
table.insert(lua_runtime_path, "lua/?/init.lua")
|
|
||||||
table.insert(lua_runtime_path, vim.fn.stdpath('config') .. "lua/?.lua")
|
|
||||||
|
|
||||||
lspconfig.sumneko_lua.setup({
|
|
||||||
settings = {
|
local lsp = require('lsp-zero')
|
||||||
Lua = {
|
|
||||||
runtime = {
|
-- lsp.preset('recommended')
|
||||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
lsp.set_preferences({
|
||||||
version = 'LuaJIT',
|
suggest_lsp_servers = true,
|
||||||
-- Setup your lua path
|
setup_servers_on_start = true,
|
||||||
path = lua_runtime_path,
|
set_lsp_keymaps = true,
|
||||||
},
|
configure_diagnostics = true,
|
||||||
format = {
|
cmp_capabilities = true,
|
||||||
enable = true,
|
manage_nvim_cmp = true,
|
||||||
defaultConfig = {
|
call_servers = 'local',
|
||||||
keep_one_space_between_table_and_bracket = "false",
|
sign_icons = {
|
||||||
}
|
error = 'E',
|
||||||
},
|
warn = 'W',
|
||||||
diagnostics = {
|
hint = 'H',
|
||||||
-- Get the language server to recognize the `vim` global
|
info = 'I'
|
||||||
globals = {'vim'},
|
|
||||||
["codestyle-check"] = "Any",
|
|
||||||
},
|
|
||||||
-- Do not send telemetry data containing a randomized but unique identifier
|
|
||||||
telemetry = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
lsp.setup()
|
||||||
|
|
||||||
|
-- should be after setup
|
||||||
|
vim.diagnostic.config({
|
||||||
|
virtual_text = true,
|
||||||
|
signs = true,
|
||||||
|
update_in_insert = false,
|
||||||
|
underline = true,
|
||||||
|
severity_sort = false,
|
||||||
|
float = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
require("mason").setup({})
|
-- require("mason").setup({})
|
||||||
require("mason-tool-installer").setup({
|
-- require("mason-tool-installer").setup({
|
||||||
-- https://github.com/williamboman/mason-lspconfig.nvim/blob/main/doc/server-mapping.md
|
-- -- https://github.com/williamboman/mason-lspconfig.nvim/blob/main/doc/server-mapping.md
|
||||||
ensure_installed = { "bash-language-server", "black", "dockerfile-language-server",
|
-- ensure_installed = { "bash-language-server", "black", "dockerfile-language-server",
|
||||||
"isort", "json-lsp", "jsonlint", "lua-language-server", "marksman", "prettierd",
|
-- "isort", "json-lsp", "jsonlint", "lua-language-server", "marksman", "prettierd",
|
||||||
"python-lsp-server", "rubocop", "shfmt", "solargraph", "terraform-ls",
|
-- "python-lsp-server", "rubocop", "shfmt", "solargraph", "terraform-ls",
|
||||||
"vim-language-server", "yaml-language-server",
|
-- "vim-language-server", "yaml-language-server",
|
||||||
},
|
-- },
|
||||||
auto_update = true,
|
-- auto_update = true,
|
||||||
run_on_start = true
|
-- run_on_start = true
|
||||||
})
|
-- })
|
||||||
|
|||||||
@@ -1,30 +1,37 @@
|
|||||||
-- https://github.com/shaunsingh/nord.nvim#%EF%B8%8F-configuration
|
local M = {}
|
||||||
|
|
||||||
-- Make sidebars and popup menus like nvim-tree and telescope
|
function M.setup()
|
||||||
-- have a different background
|
-- https://github.com/shaunsingh/nord.nvim#%EF%B8%8F-configuration
|
||||||
vim.g.nord_contrast = true
|
|
||||||
|
|
||||||
-- Enable the border between verticaly split windows visable
|
-- Make sidebars and popup menus like nvim-tree and telescope
|
||||||
vim.g.nord_borders = true
|
-- have a different background
|
||||||
|
vim.g.nord_contrast = true
|
||||||
|
|
||||||
-- Disable the setting of background color so that NeoVim
|
-- Enable the border between verticaly split windows visable
|
||||||
-- can use your terminal background
|
vim.g.nord_borders = true
|
||||||
vim.g.nord_disable_background = false
|
|
||||||
|
|
||||||
-- Set the cursorline transparent/visible
|
-- Disable the setting of background color so that NeoVim
|
||||||
vim.g.nord_cursorline_transparent = false
|
-- can use your terminal background
|
||||||
|
vim.g.nord_disable_background = false
|
||||||
|
|
||||||
-- Re-enables the background of the sidebar if you disabled the background of everything
|
-- Set the cursorline transparent/visible
|
||||||
vim.g.nord_enable_sidebar_background = false
|
vim.g.nord_cursorline_transparent = false
|
||||||
|
|
||||||
-- Enables/disables italics
|
-- Re-enables the background of the sidebar if you disabled the background of everything
|
||||||
vim.g.nord_italic = true
|
vim.g.nord_enable_sidebar_background = false
|
||||||
|
|
||||||
-- Enables/disables colorful backgrounds when used in diff mode
|
-- Enables/disables italics
|
||||||
vim.g.nord_uniform_diff_background = true
|
vim.g.nord_italic = true
|
||||||
|
|
||||||
-- Enables/disables bold
|
-- Enables/disables colorful backgrounds when used in diff mode
|
||||||
vim.g.nord_bold = false
|
vim.g.nord_uniform_diff_background = true
|
||||||
|
|
||||||
-- Load the colorscheme
|
-- Enables/disables bold
|
||||||
require('nord').set()
|
vim.g.nord_bold = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
require('nord').set()
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|||||||
@@ -1,2 +1,54 @@
|
|||||||
-- Enable telescope fzf native, if installed
|
local M = {}
|
||||||
pcall(require('telescope').load_extension, 'fzf')
|
|
||||||
|
function M.setup()
|
||||||
|
vim.keymap.set('n', '<leader>ff', function() require('telescope.builtin').find_files({ hidden = true }) end)
|
||||||
|
vim.keymap.set('n', '<leader>fh', function() require('telescope.builtin').help_tags() end)
|
||||||
|
-- require('telescope.builtin').find_files({ hidden = true })
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
local telescope = require 'telescope'
|
||||||
|
|
||||||
|
telescope.setup {
|
||||||
|
defaults = {
|
||||||
|
layout_strategy = 'vertical',
|
||||||
|
winblend = 7,
|
||||||
|
set_env = { COLORTERM = 'truecolor' },
|
||||||
|
color_devicons = true,
|
||||||
|
scroll_strategy = 'limit',
|
||||||
|
},
|
||||||
|
pickers = {
|
||||||
|
live_grep = {
|
||||||
|
only_sort_text = true,
|
||||||
|
path_display = { 'shorten' },
|
||||||
|
layout_strategy = 'horizontal',
|
||||||
|
layout_config = { preview_width = 0.4 },
|
||||||
|
},
|
||||||
|
git_files = {
|
||||||
|
path_display = {},
|
||||||
|
hidden = true,
|
||||||
|
show_untracked = true,
|
||||||
|
layout_strategy = 'horizontal',
|
||||||
|
layout_config = { preview_width = 0.65 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
extensions = {
|
||||||
|
fzf = {
|
||||||
|
override_generic_sorter = true,
|
||||||
|
override_file_sorter = true,
|
||||||
|
case_mode = 'smart_case',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- pcall(require('telescope').load_extension, 'fzf')
|
||||||
|
-- Enable telescope fzf native, if installed
|
||||||
|
telescope.load_extension('fzf')
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Telescope
|
||||||
|
-- TODO: change to Telescope
|
||||||
|
-- nmap('<leader>ft', ':Files ~/Tmp<CR>')
|
||||||
|
-- nmap('<leader>fo', ":call fzf#run(fzf#wrap(fzf#vim#with_preview({ 'source': 'fd . --type f --extension=md --follow --exclude .git ~/Syncthing/Obsidian/Personal' })))<CR>", { silent = true })
|
||||||
|
|
||||||
|
return M
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
-- Tree-sitter
|
local M = {}
|
||||||
require('nvim-treesitter.configs').setup {
|
|
||||||
|
function M.config()
|
||||||
|
require('nvim-treesitter.configs').setup {
|
||||||
-- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
-- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||||
ensure_installed = { 'bash', 'c', 'cpp', 'c_sharp', 'clojure', 'cmake', 'comment', 'commonlisp',
|
ensure_installed = { 'bash', 'c', 'cpp', 'c_sharp', 'clojure', 'cmake', 'comment', 'commonlisp',
|
||||||
'css', 'dockerfile', 'elixir', 'erlang', 'fish', 'go', 'html', 'http', 'java',
|
'css', 'dockerfile', 'elixir', 'erlang', 'fish', 'go', 'html', 'http', 'java',
|
||||||
@@ -24,4 +26,7 @@ require('nvim-treesitter.configs').setup {
|
|||||||
autopairs = { enable = true },
|
autopairs = { enable = true },
|
||||||
autotag = { enable = true },
|
autotag = { enable = true },
|
||||||
incremental_selection = { enable = true },
|
incremental_selection = { enable = true },
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|||||||
@@ -1,92 +0,0 @@
|
|||||||
-- TODO:
|
|
||||||
-- " Conceal mostly for markdown TODO :h conceallevel
|
|
||||||
-- set conceallevel=2
|
|
||||||
-- " Highlight VCS conflict markers TODO: translate to LUA
|
|
||||||
-- match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
|
|
||||||
|
|
||||||
-- local g = vim.g -- a table to access global variables
|
|
||||||
local opt = vim.opt -- to set options
|
|
||||||
local cmd = vim.cmd -- to set options
|
|
||||||
|
|
||||||
cmd('au TextYankPost * lua vim.highlight.on_yank { timeout = 250 }')
|
|
||||||
cmd('colorscheme nord')
|
|
||||||
|
|
||||||
opt.smartindent = true -- Autoindenting when starting a new line
|
|
||||||
opt.completeopt = {'menu', 'menuone', 'noselect'}
|
|
||||||
opt.tabstop = 2 -- Tab counts as 2 columns
|
|
||||||
opt.shiftwidth = 2 -- Numbers of spaces to (auto)indent
|
|
||||||
opt.expandtab = true -- Tabs to spaces
|
|
||||||
opt.clipboard = 'unnamedplus' -- Share clipboard with the OS
|
|
||||||
opt.number = true -- Display line numbers
|
|
||||||
opt.fillchars = {
|
|
||||||
vert = '▕', -- alternatives │
|
|
||||||
eob = ' ', -- suppress ~ at EndOfBuffer
|
|
||||||
msgsep = '‾',
|
|
||||||
diff = '⣿',
|
|
||||||
fold = ' ',
|
|
||||||
foldopen = '▾',
|
|
||||||
foldsep = '│',
|
|
||||||
foldclose = '▸',
|
|
||||||
}
|
|
||||||
opt.synmaxcol = 500 -- Do not try to highlight lines longer than 500 characters
|
|
||||||
opt.lazyredraw = true -- Do not redraw while running macros
|
|
||||||
opt.showmatch = true -- Show matching braces
|
|
||||||
opt.matchtime = 2 -- Show matching braces for 2 tenths of second
|
|
||||||
opt.showmode = true -- Shows when you are in insert mode
|
|
||||||
opt.title = true -- Show title in console status bar
|
|
||||||
opt.laststatus = 3 -- Single status line
|
|
||||||
opt.wrap = false -- Dont wrap lines
|
|
||||||
opt.scrolloff = 5 -- Keep 5 rows on the screen when scrolling
|
|
||||||
opt.sidescrolloff = 15 -- Horizontal scrolloff
|
|
||||||
opt.visualbell = false -- No visual bell
|
|
||||||
opt.backup = false -- No backups
|
|
||||||
opt.writebackup = false -- No backups
|
|
||||||
opt.swapfile = false -- No backups
|
|
||||||
opt.mouse = 'a' -- Support mouse (for proper mouse highlight)
|
|
||||||
opt.list = true -- List mode
|
|
||||||
opt.listchars = { trail = '·', tab = '->' }
|
|
||||||
opt.timeoutlen = 1000 -- Delay for mappings
|
|
||||||
opt.ttimeoutlen = 0 -- Delay between modes
|
|
||||||
opt.shellcmdflag = '-ic' -- Enables aliases from .bashrc in :! commands
|
|
||||||
opt.termguicolors = true -- 24-bit RGB color
|
|
||||||
|
|
||||||
|
|
||||||
if vim.fn.executable('rg') > 0 then
|
|
||||||
vim.o.grepprg = [[rg --glob "!.git" --no-heading --vimgrep --follow $*]]
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Use in vertical diff mode, blank lines to keep sides aligned, Ignore whitespace changes
|
|
||||||
opt.diffopt = vim.opt.diffopt
|
|
||||||
+ {
|
|
||||||
'vertical',
|
|
||||||
'iwhite',
|
|
||||||
'hiddenoff',
|
|
||||||
'foldcolumn:0',
|
|
||||||
'context:4',
|
|
||||||
'algorithm:histogram',
|
|
||||||
'indent-heuristic',
|
|
||||||
}
|
|
||||||
|
|
||||||
opt.shortmess = {
|
|
||||||
t = true, -- truncate file messages at start
|
|
||||||
A = true, -- ignore annoying swap file messages
|
|
||||||
o = true, -- file-read message overwrites previous
|
|
||||||
O = true, -- file-read message overwrites previous
|
|
||||||
T = true, -- truncate non-file messages in middle
|
|
||||||
f = true, -- (file x of x) instead of just (x of x
|
|
||||||
F = true, -- Don't give file info when editing a file, NOTE: this breaks autocommand messages
|
|
||||||
s = true,
|
|
||||||
I = true, -- disable welcome message (:intro)
|
|
||||||
a = true, -- shortmess for everything
|
|
||||||
c = true,
|
|
||||||
W = true, -- Don't show [w] or written when writing
|
|
||||||
}
|
|
||||||
|
|
||||||
-- ignore when autocompleting
|
|
||||||
opt.wildignore = {
|
|
||||||
'*.aux', '*.out', '*.toc', '*.o', '*.obj',
|
|
||||||
'*.dll', '*.jar', '*.pyc', '*.rbc', '*.class',
|
|
||||||
'*.gif', '*.ico', '*.jpg', '*.jpeg', '*.png',
|
|
||||||
'*.avi', '*.wav', '*.*~', '*~ ', '*.swp',
|
|
||||||
'.lock', '.DS_Store', 'tags.lock'
|
|
||||||
}
|
|
||||||
@@ -79,11 +79,26 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||||
url = "https://github.com/L3MON4D3/LuaSnip"
|
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||||
},
|
},
|
||||||
|
["cmp-buffer"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp-buffer",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-buffer"
|
||||||
|
},
|
||||||
["cmp-nvim-lsp"] = {
|
["cmp-nvim-lsp"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||||
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||||
},
|
},
|
||||||
|
["cmp-nvim-lua"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-nvim-lua"
|
||||||
|
},
|
||||||
|
["cmp-path"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp-path",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-path"
|
||||||
|
},
|
||||||
cmp_luasnip = {
|
cmp_luasnip = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
|
||||||
@@ -104,39 +119,36 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/friendly-snippets",
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/friendly-snippets",
|
||||||
url = "https://github.com/rafamadriz/friendly-snippets"
|
url = "https://github.com/rafamadriz/friendly-snippets"
|
||||||
},
|
},
|
||||||
fzf = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/fzf",
|
|
||||||
url = "https://github.com/junegunn/fzf"
|
|
||||||
},
|
|
||||||
["fzf.vim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/fzf.vim",
|
|
||||||
url = "https://github.com/junegunn/fzf.vim"
|
|
||||||
},
|
|
||||||
["glow.nvim"] = {
|
["glow.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/glow.nvim",
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/glow.nvim",
|
||||||
url = "https://github.com/ellisonleao/glow.nvim"
|
url = "https://github.com/ellisonleao/glow.nvim"
|
||||||
},
|
},
|
||||||
|
["impatient.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/impatient.nvim",
|
||||||
|
url = "https://github.com/lewis6991/impatient.nvim"
|
||||||
|
},
|
||||||
|
["lsp-zero.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
|
||||||
|
url = "https://github.com/VonHeikemen/lsp-zero.nvim"
|
||||||
|
},
|
||||||
["mason-lspconfig.nvim"] = {
|
["mason-lspconfig.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
|
||||||
url = "https://github.com/williamboman/mason-lspconfig.nvim"
|
url = "https://github.com/williamboman/mason-lspconfig.nvim"
|
||||||
},
|
},
|
||||||
["mason-tool-installer.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/mason-tool-installer.nvim",
|
|
||||||
url = "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim"
|
|
||||||
},
|
|
||||||
["mason.nvim"] = {
|
["mason.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/mason.nvim",
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/mason.nvim",
|
||||||
url = "https://github.com/williamboman/mason.nvim"
|
url = "https://github.com/williamboman/mason.nvim"
|
||||||
},
|
},
|
||||||
["nord.nvim"] = {
|
["nord.nvim"] = {
|
||||||
|
config = { "\27LJ\2\n;\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\vconfig\17plugins/nord\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/nord.nvim",
|
needs_bufread = false,
|
||||||
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/opt/nord.nvim",
|
||||||
url = "https://github.com/shaunsingh/nord.nvim"
|
url = "https://github.com/shaunsingh/nord.nvim"
|
||||||
},
|
},
|
||||||
["null-ls.nvim"] = {
|
["null-ls.nvim"] = {
|
||||||
@@ -160,13 +172,17 @@ _G.packer_plugins = {
|
|||||||
url = "https://github.com/nvim-tree/nvim-tree.lua"
|
url = "https://github.com/nvim-tree/nvim-tree.lua"
|
||||||
},
|
},
|
||||||
["nvim-treesitter"] = {
|
["nvim-treesitter"] = {
|
||||||
loaded = true,
|
config = { "\27LJ\2\nA\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\vconfig\23plugins/treesitter\frequire\0" },
|
||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/opt/nvim-treesitter",
|
||||||
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
["packer.nvim"] = {
|
["packer.nvim"] = {
|
||||||
loaded = true,
|
loaded = false,
|
||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
needs_bufread = false,
|
||||||
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/opt/packer.nvim",
|
||||||
url = "https://github.com/wbthomason/packer.nvim"
|
url = "https://github.com/wbthomason/packer.nvim"
|
||||||
},
|
},
|
||||||
["plenary.nvim"] = {
|
["plenary.nvim"] = {
|
||||||
@@ -188,8 +204,11 @@ _G.packer_plugins = {
|
|||||||
url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
|
url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
|
||||||
},
|
},
|
||||||
["telescope.nvim"] = {
|
["telescope.nvim"] = {
|
||||||
loaded = true,
|
config = { "\27LJ\2\n@\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\vconfig\22plugins/telescope\frequire\0" },
|
||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
loaded = false,
|
||||||
|
needs_bufread = true,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/opt/telescope.nvim",
|
||||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
},
|
},
|
||||||
["vim-easy-align"] = {
|
["vim-easy-align"] = {
|
||||||
@@ -222,6 +241,14 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/vim-rhubarb",
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/vim-rhubarb",
|
||||||
url = "https://github.com/tpope/vim-rhubarb"
|
url = "https://github.com/tpope/vim-rhubarb"
|
||||||
},
|
},
|
||||||
|
["vim-startuptime"] = {
|
||||||
|
commands = { "StartupTime" },
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = false,
|
||||||
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/opt/vim-startuptime",
|
||||||
|
url = "https://github.com/dstein64/vim-startuptime"
|
||||||
|
},
|
||||||
["vim-surround"] = {
|
["vim-surround"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/vim-surround",
|
path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/vim-surround",
|
||||||
@@ -245,11 +272,74 @@ _G.packer_plugins = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
time([[Defining packer_plugins]], false)
|
time([[Defining packer_plugins]], false)
|
||||||
|
local module_lazy_loads = {
|
||||||
|
["^telescope"] = "telescope.nvim"
|
||||||
|
}
|
||||||
|
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
|
||||||
|
|
||||||
|
-- Setup for: telescope.nvim
|
||||||
|
time([[Setup for telescope.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n?\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\22plugins/telescope\frequire\0", "setup", "telescope.nvim")
|
||||||
|
time([[Setup for telescope.nvim]], false)
|
||||||
|
-- Setup for: nord.nvim
|
||||||
|
time([[Setup for nord.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n:\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\17plugins/nord\frequire\0", "setup", "nord.nvim")
|
||||||
|
time([[Setup for nord.nvim]], false)
|
||||||
|
time([[packadd for nord.nvim]], true)
|
||||||
|
vim.cmd [[packadd nord.nvim]]
|
||||||
|
time([[packadd for nord.nvim]], false)
|
||||||
|
-- Config for: nord.nvim
|
||||||
|
time([[Config for nord.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n;\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\vconfig\17plugins/nord\frequire\0", "config", "nord.nvim")
|
||||||
|
time([[Config for nord.nvim]], false)
|
||||||
-- Conditional loads
|
-- Conditional loads
|
||||||
time([[Conditional loading of telescope-fzf-native.nvim]], true)
|
time([[Conditional loading of telescope-fzf-native.nvim]], true)
|
||||||
require("packer.load")({"telescope-fzf-native.nvim"}, {}, _G.packer_plugins)
|
require("packer.load")({"telescope-fzf-native.nvim"}, {}, _G.packer_plugins)
|
||||||
time([[Conditional loading of telescope-fzf-native.nvim]], false)
|
time([[Conditional loading of telescope-fzf-native.nvim]], false)
|
||||||
|
|
||||||
|
-- Command lazy-loads
|
||||||
|
time([[Defining lazy-load commands]], true)
|
||||||
|
pcall(vim.api.nvim_create_user_command, 'StartupTime', function(cmdargs)
|
||||||
|
require('packer.load')({'vim-startuptime'}, { cmd = 'StartupTime', l1 = cmdargs.line1, l2 = cmdargs.line2, bang = cmdargs.bang, args = cmdargs.args, mods = cmdargs.mods }, _G.packer_plugins)
|
||||||
|
end,
|
||||||
|
{nargs = '*', range = true, bang = true, complete = function()
|
||||||
|
require('packer.load')({'vim-startuptime'}, { cmd = 'StartupTime' }, _G.packer_plugins)
|
||||||
|
return vim.fn.getcompletion('StartupTime ', 'cmdline')
|
||||||
|
end})
|
||||||
|
time([[Defining lazy-load commands]], false)
|
||||||
|
|
||||||
|
vim.cmd [[augroup packer_load_aucmds]]
|
||||||
|
vim.cmd [[au!]]
|
||||||
|
-- Event lazy-loads
|
||||||
|
time([[Defining lazy-load event autocommands]], true)
|
||||||
|
vim.cmd [[au BufRead * ++once lua require("packer.load")({'nvim-treesitter'}, { event = "BufRead *" }, _G.packer_plugins)]]
|
||||||
|
vim.cmd [[au BufNewFile * ++once lua require("packer.load")({'nvim-treesitter'}, { event = "BufNewFile *" }, _G.packer_plugins)]]
|
||||||
|
time([[Defining lazy-load event autocommands]], false)
|
||||||
|
vim.cmd("augroup END")
|
||||||
|
|
||||||
_G._packer.inside_compile = false
|
_G._packer.inside_compile = false
|
||||||
if _G._packer.needs_bufread == true then
|
if _G._packer.needs_bufread == true then
|
||||||
vim.cmd("doautocmd BufRead")
|
vim.cmd("doautocmd BufRead")
|
||||||
|
|||||||
Reference in New Issue
Block a user