lazy btw
This commit is contained in:
@@ -7,7 +7,20 @@ vim.api.nvim_set_hl(0, "NormalFloat", { bg = "NONE" })
|
|||||||
vim.api.nvim_set_hl(0, "FloatBorder", { bg = "NONE" })
|
vim.api.nvim_set_hl(0, "FloatBorder", { bg = "NONE" })
|
||||||
vim.api.nvim_set_hl(0, "CmpItemMenu", { bg = "NONE" })
|
vim.api.nvim_set_hl(0, "CmpItemMenu", { bg = "NONE" })
|
||||||
|
|
||||||
require('plugins')
|
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",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable", -- latest stable release
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
require("lazy").setup(require('plugins'))
|
||||||
|
|
||||||
vim.cmd('source ~/.config/nvim/neovim.vim')
|
vim.cmd('source ~/.config/nvim/neovim.vim')
|
||||||
|
|
||||||
|
|||||||
@@ -1,261 +1,194 @@
|
|||||||
local fn = vim.fn
|
return {
|
||||||
local installPath = DATA_PATH..'/site/pack/packer/start/packer.nvim'
|
{
|
||||||
|
'rebelot/kanagawa.nvim',
|
||||||
-- install packer if it's not installed already
|
lazy = false,
|
||||||
local packerBootstrap = nil
|
priority = 1000,
|
||||||
if fn.empty(fn.glob(installPath)) > 0 then
|
config = function ()
|
||||||
packerBootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', installPath})
|
vim.cmd('colorscheme kanagawa')
|
||||||
vim.cmd [[packadd packer.nvim]]
|
end
|
||||||
end
|
},
|
||||||
|
|
||||||
|
|
||||||
local packer = require('packer').startup(function(use)
|
|
||||||
-- Packer should manage itself
|
|
||||||
use 'wbthomason/packer.nvim'
|
|
||||||
|
|
||||||
-- colourscheme
|
|
||||||
use { 'rebelot/kanagawa.nvim' }
|
|
||||||
use 'nvim-tree/nvim-web-devicons'
|
|
||||||
|
|
||||||
-- QUALITY OF LIFE INTEGRATIONS
|
-- QUALITY OF LIFE INTEGRATIONS
|
||||||
|
{
|
||||||
-- git integration
|
-- git integration
|
||||||
use 'tpope/vim-fugitive'
|
'tpope/vim-fugitive',
|
||||||
|
opts = {}
|
||||||
use {
|
},
|
||||||
|
{
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
requires = { 'nvim-lua/plenary.nvim' },
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
config = function ()
|
config = function ()
|
||||||
require('plugin-config/gitsigns')
|
require('plugin-config/gitsigns')
|
||||||
end
|
end
|
||||||
}
|
},
|
||||||
|
{
|
||||||
-- colourise colour codes
|
-- colourise colour codes
|
||||||
use {
|
|
||||||
'norcalli/nvim-colorizer.lua',
|
'norcalli/nvim-colorizer.lua',
|
||||||
config = function ()
|
lazy = true,
|
||||||
require('colorizer').setup({})
|
opts = {}
|
||||||
end
|
},
|
||||||
}
|
{
|
||||||
|
-- EPIC HARPOON MOMENT
|
||||||
-- harpoon
|
|
||||||
use {
|
|
||||||
'ThePrimeagen/harpoon',
|
'ThePrimeagen/harpoon',
|
||||||
config = function ()
|
opts = {
|
||||||
require('harpoon').setup({
|
tabline = true,
|
||||||
tabline = true,
|
},
|
||||||
})
|
keys = {
|
||||||
vim.keymap.set("n", "<leader>hh", require("harpoon.ui").toggle_quick_menu, { desc = "Toggle harpoon menu" })
|
{ '<leader>hh', '<cmd>lua require("harpoon.ui").toggle_quick_menu()<cr>', desc = "Toggle harpoon menu" },
|
||||||
vim.keymap.set("n", "<leader>hg", require("harpoon.mark").toggle_file, { desc = "Add file to harpoon list" })
|
{ '<leader>hg', '<cmd>require("harpoon.mark").toggle_file() <cr>', desc = "Add file to harpoon list" },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
for pos = 1, 9 do
|
for pos = 1, 9 do
|
||||||
vim.keymap.set("n", "<C-w>" .. pos, function()
|
vim.keymap.set("n", "<C-w>" .. pos, function()
|
||||||
require("harpoon.ui").nav_file(pos)
|
require("harpoon.ui").nav_file(pos)
|
||||||
end, { desc = "Move to harpoon mark #" .. pos })
|
end, { desc = "Move to harpoon mark #" .. pos })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
}
|
},
|
||||||
|
{
|
||||||
-- telescope - searching / navigation
|
|
||||||
use {
|
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
requires = {
|
dependencies = {
|
||||||
'nvim-lua/plenary.nvim',
|
'nvim-lua/plenary.nvim',
|
||||||
'nvim-telescope/telescope-ui-select.nvim',
|
'nvim-telescope/telescope-ui-select.nvim',
|
||||||
'debugloop/telescope-undo.nvim',
|
'debugloop/telescope-undo.nvim',
|
||||||
'folke/todo-comments.nvim',
|
'folke/todo-comments.nvim',
|
||||||
|
'kevinhwang91/nvim-bqf',
|
||||||
},
|
},
|
||||||
config = function ()
|
config = function ()
|
||||||
require('plugin-config/telescope')
|
require('plugin-config/telescope')
|
||||||
require('todo-comments').setup({})
|
require('todo-comments').setup({})
|
||||||
end
|
end
|
||||||
}
|
},
|
||||||
|
{
|
||||||
-- better hotfix window (for showing and searching through results in telescope's find usages)
|
'nvim-treesitter/nvim-treesitter-context',
|
||||||
use 'kevinhwang91/nvim-bqf'
|
build = ':TSUpdate',
|
||||||
|
dependencies = {
|
||||||
-- better highlighting
|
'nvim-treesitter/nvim-treesitter',
|
||||||
use {
|
},
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
run = ':TSUpdate',
|
|
||||||
config = function ()
|
config = function ()
|
||||||
require('plugin-config/nvim-treesitter')
|
require('plugin-config/nvim-treesitter')
|
||||||
end
|
end
|
||||||
}
|
},
|
||||||
use 'nvim-treesitter/nvim-treesitter-context'
|
{
|
||||||
|
|
||||||
-- better split navigation
|
|
||||||
use {
|
|
||||||
'mrjones2014/smart-splits.nvim',
|
'mrjones2014/smart-splits.nvim',
|
||||||
config = function ()
|
config = function ()
|
||||||
require('plugin-config/smart-splits')
|
require('plugin-config/smart-splits')
|
||||||
end
|
end
|
||||||
}
|
},
|
||||||
|
{
|
||||||
-- zen m
|
|
||||||
use {
|
|
||||||
'folke/zen-mode.nvim',
|
'folke/zen-mode.nvim',
|
||||||
config = function()
|
lazy = true,
|
||||||
require('zen-mode').setup({})
|
opts = {},
|
||||||
vim.keymap.set("n", "<leader>z", function()
|
keys = {
|
||||||
require("zen-mode").toggle()
|
{ '<leader>z', '<cmd>lua require("zen-mode").toggle()<cr>', desc = "Toggle zen mode" },
|
||||||
end, { desc = "Toggle Zen Mode" })
|
},
|
||||||
end
|
},
|
||||||
}
|
{
|
||||||
|
|
||||||
-- gorbit's codewindow
|
|
||||||
use {
|
|
||||||
'gorbit99/codewindow.nvim',
|
'gorbit99/codewindow.nvim',
|
||||||
config = function()
|
lazy = true,
|
||||||
local codewindow = require('codewindow')
|
opts = {},
|
||||||
codewindow.setup()
|
config = function ()
|
||||||
codewindow.apply_default_keybinds()
|
require('codewindow').apply_default_keybinds()
|
||||||
end
|
end
|
||||||
}
|
},
|
||||||
|
{
|
||||||
-- nerd commenter
|
'scrooloose/nerdcommenter'
|
||||||
use 'scrooloose/nerdcommenter'
|
},
|
||||||
|
{
|
||||||
-- LSP code previews
|
'glepnir/lspsaga.nvim',
|
||||||
use {
|
lazy = true,
|
||||||
"glepnir/lspsaga.nvim",
|
opts = {
|
||||||
opt = true,
|
symbol_in_winbar = {
|
||||||
branch = "main",
|
enable = false,
|
||||||
event = "LspAttach",
|
},
|
||||||
config = function()
|
lightbulb = {
|
||||||
require("lspsaga").setup({
|
enable = false,
|
||||||
symbol_in_winbar = {
|
},
|
||||||
enable = false,
|
rename = {
|
||||||
},
|
whole_project = false,
|
||||||
lightbulb = {
|
}
|
||||||
enable = false,
|
},
|
||||||
},
|
},
|
||||||
rename = {
|
{
|
||||||
whole_project = false,
|
'ntpeters/vim-better-whitespace'
|
||||||
}
|
},
|
||||||
})
|
{
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
-- whitespace pedantics
|
|
||||||
use 'ntpeters/vim-better-whitespace'
|
|
||||||
|
|
||||||
-- auto brace pairs vscode-style
|
|
||||||
use {
|
|
||||||
'windwp/nvim-autopairs',
|
'windwp/nvim-autopairs',
|
||||||
config = function()
|
opts = {},
|
||||||
require('nvim-autopairs').setup({})
|
},
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
-- obsidian!!!
|
|
||||||
use {
|
|
||||||
'epwalsh/obsidian.nvim',
|
|
||||||
config = function()
|
|
||||||
require('plugin-config/obsidian')
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
-- VISUAL CHANGES
|
-- VISUAL CHANGES
|
||||||
|
{
|
||||||
-- epic splash screen
|
|
||||||
use {
|
|
||||||
'jovanlanik/fsplash.nvim',
|
'jovanlanik/fsplash.nvim',
|
||||||
config = function ()
|
opts = {
|
||||||
require('fsplash').setup({
|
lines = {
|
||||||
lines = {
|
"▄▄▄▄· ▄▄▄ . ▐ ▄ ▌ ▐·▪ • ▌ ▄ ·. ",
|
||||||
"▄▄▄▄· ▄▄▄ . ▐ ▄ ▌ ▐·▪ • ▌ ▄ ·. ",
|
"▐█ ▀█▪▀▄.▀·•█▌▐█▪█·█▌██ ·██ ▐███▪",
|
||||||
"▐█ ▀█▪▀▄.▀·•█▌▐█▪█·█▌██ ·██ ▐███▪",
|
"▐█▀▀█▄▐▀▀▪▄▐█▐▐▌▐█▐█•▐█·▐█ ▌▐▌▐█·",
|
||||||
"▐█▀▀█▄▐▀▀▪▄▐█▐▐▌▐█▐█•▐█·▐█ ▌▐▌▐█·",
|
"██▄▪▐█▐█▄▄▌██▐█▌ ███ ▐█▌██ ██▌▐█▌",
|
||||||
"██▄▪▐█▐█▄▄▌██▐█▌ ███ ▐█▌██ ██▌▐█▌",
|
"·▀▀▀▀ ▀▀▀ ▀▀ █▪. ▀ ▀▀▀▀▀ █▪▀▀▀",
|
||||||
"·▀▀▀▀ ▀▀▀ ▀▀ █▪. ▀ ▀▀▀▀▀ █▪▀▀▀",
|
'',
|
||||||
'',
|
'NVIM v'
|
||||||
'NVIM v'
|
.. vim.version().major
|
||||||
.. vim.version().major
|
.. '.'
|
||||||
.. '.'
|
.. vim.version().minor
|
||||||
.. vim.version().minor
|
.. '.'
|
||||||
.. '.'
|
.. vim.version().patch,
|
||||||
.. vim.version().patch,
|
'Nvim is open Source and freely distributable',
|
||||||
'Nvim is open Source and freely distributable',
|
'',
|
||||||
'',
|
'type :checkhealth<Enter> to optimize Nvim',
|
||||||
'type :checkhealth<Enter> to optimize Nvim',
|
'type :q<Enter> to exit ',
|
||||||
'type :q<Enter> to exit ',
|
'type :help<Enter> for help ',
|
||||||
'type :help<Enter> for help ',
|
'',
|
||||||
'',
|
'type :help news<Enter> to see changes in v'
|
||||||
'type :help news<Enter> to see changes in v'
|
.. vim.version().major
|
||||||
.. vim.version().major
|
.. '.'
|
||||||
.. '.'
|
.. vim.version().minor
|
||||||
.. vim.version().minor
|
},
|
||||||
},
|
border = 'none';
|
||||||
border = 'none';
|
},
|
||||||
})
|
},
|
||||||
end
|
{
|
||||||
}
|
|
||||||
|
|
||||||
-- nicer looking tab display
|
|
||||||
use {
|
|
||||||
'lukas-reineke/indent-blankline.nvim',
|
'lukas-reineke/indent-blankline.nvim',
|
||||||
config = function ()
|
opts = {
|
||||||
require('indent_blankline').setup({
|
char = '│',
|
||||||
char = '│',
|
filetype_exclude = { 'help', 'alpha', 'dashboard', 'neo-tree', 'Trouble', 'lazy' },
|
||||||
filetype_exclude = { 'help', 'alpha', 'dashboard', 'neo-tree', 'Trouble', 'lazy' },
|
}
|
||||||
})
|
},
|
||||||
end
|
{
|
||||||
}
|
|
||||||
|
|
||||||
-- nicer looking indent guides
|
|
||||||
use {
|
|
||||||
'echasnovski/mini.indentscope',
|
'echasnovski/mini.indentscope',
|
||||||
config = function ()
|
opts = {
|
||||||
require('mini.indentscope').setup({
|
symbol = '│',
|
||||||
symbol = '│',
|
options = { try_as_border = true },
|
||||||
options = { try_as_border = true },
|
},
|
||||||
})
|
},
|
||||||
end
|
{
|
||||||
}
|
|
||||||
|
|
||||||
-- colourcolumn that looks better
|
|
||||||
use {
|
|
||||||
'ecthelionvi/NeoColumn.nvim',
|
'ecthelionvi/NeoColumn.nvim',
|
||||||
config = function()
|
opts = {
|
||||||
require('NeoColumn').setup({
|
NeoColumn = '80',
|
||||||
NeoColumn = '80',
|
always_on = true,
|
||||||
always_on = true,
|
},
|
||||||
})
|
},
|
||||||
end
|
{
|
||||||
}
|
|
||||||
|
|
||||||
-- statusline
|
|
||||||
use {
|
|
||||||
'benkyd/nvim-hardline',
|
'benkyd/nvim-hardline',
|
||||||
config = function ()
|
opts = {},
|
||||||
require('hardline').setup({})
|
},
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
-- FUNCTIONAL CODING STUFF
|
-- FUNCTIONAL CODING STUFF
|
||||||
|
{
|
||||||
-- AI Autocompletion
|
|
||||||
use {
|
|
||||||
'zbirenbaum/copilot.lua',
|
'zbirenbaum/copilot.lua',
|
||||||
cmd = 'Copilot',
|
|
||||||
event = 'InsertEnter',
|
event = 'InsertEnter',
|
||||||
config = function()
|
opts = {
|
||||||
require('copilot').setup({
|
suggestion = {
|
||||||
suggestion = {
|
enabled = true,
|
||||||
enabled = true,
|
auto_trigger = true,
|
||||||
auto_trigger = true,
|
keymap = {
|
||||||
keymap = {
|
accept = '<C-CR>',
|
||||||
accept = '<C-CR>',
|
}
|
||||||
}
|
},
|
||||||
},
|
}
|
||||||
})
|
},
|
||||||
end
|
{
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
'VonHeikemen/lsp-zero.nvim',
|
'VonHeikemen/lsp-zero.nvim',
|
||||||
branch = 'v1.x',
|
branch = 'v1.x',
|
||||||
requires = {
|
dependencies = {
|
||||||
-- LSP Support
|
-- LSP Support
|
||||||
{'neovim/nvim-lspconfig'},
|
{'neovim/nvim-lspconfig'},
|
||||||
{'williamboman/mason.nvim'},
|
{'williamboman/mason.nvim'},
|
||||||
@@ -279,42 +212,30 @@ local packer = require('packer').startup(function(use)
|
|||||||
config = function ()
|
config = function ()
|
||||||
require('lsp-general')
|
require('lsp-general')
|
||||||
end
|
end
|
||||||
}
|
},
|
||||||
|
{
|
||||||
-- for lsp signature autocompletion
|
|
||||||
use {
|
|
||||||
'ray-x/lsp_signature.nvim',
|
'ray-x/lsp_signature.nvim',
|
||||||
config = function ()
|
opts = {
|
||||||
require('lsp_signature').setup({
|
hint_prefix='🚀'
|
||||||
hint_prefix='🚀'
|
},
|
||||||
})
|
},
|
||||||
end
|
{
|
||||||
}
|
url = 'https://git.sr.ht/~whynothugo/lsp_lines.nvim',
|
||||||
|
|
||||||
use({
|
|
||||||
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
|
||||||
config = function()
|
config = function()
|
||||||
require("lsp_lines").setup()
|
require('lsp_lines').setup()
|
||||||
vim.keymap.set("", "<leader>x", function()
|
vim.keymap.set('', '<leader>x', function()
|
||||||
local config = vim.diagnostic.config()
|
local config = vim.diagnostic.config()
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = not config.virtual_text,
|
virtual_text = not config.virtual_text,
|
||||||
virtual_lines = not config.virtual_lines,
|
virtual_lines = not config.virtual_lines,
|
||||||
})
|
})
|
||||||
end, { desc = "Toggle Line Diagnostics" })
|
end, { desc = 'Toggle Line Diagnostics' })
|
||||||
|
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = true,
|
virtual_text = true,
|
||||||
virtual_lines = false,
|
virtual_lines = false,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
}
|
||||||
|
|
||||||
-- this will automatically install listed dependencies
|
}
|
||||||
-- only the first time NeoVim is opened, because that's when Packer gets installed
|
|
||||||
if packerBootstrap then
|
|
||||||
require('packer').sync()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
return packer
|
|
||||||
|
|||||||
@@ -9,5 +9,3 @@ augroup vimload
|
|||||||
autocmd VimEnter * lua require('fsplash').open_window()
|
autocmd VimEnter * lua require('fsplash').open_window()
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
colorscheme kanagawa
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user