centerpad, also I'm tired of gruvbox for now

master
BraydonKains 9 months ago
parent 2e296e5ac6
commit 82abab0901

@ -1,13 +1,18 @@
require("rose-pine").setup({ require("rose-pine").setup({
variant = "moon" variant = "moon"
}) })
function SetColour(colour) function SetColour(colour)
colour = colour or "gruvbox" -- colour = colour or "gruvbox"
vim.cmd(string.format("colorscheme %s", colour)) colour = colour or "rose-pine"
vim.cmd(string.format("colorscheme %s", colour))
--vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) --vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
--vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) --vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end end
SetColour() function UnsetColour()
vim.cmd("colorscheme default")
end
-- SetColour()

@ -1,51 +1,54 @@
vim.cmd [[packadd packer.nvim]] vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use) return require('packer').startup(function(use)
use 'wbthomason/packer.nvim' use 'wbthomason/packer.nvim'
-- Navigation -- Navigation
use { use {
'nvim-telescope/telescope.nvim', tag = '0.1.5', 'nvim-telescope/telescope.nvim', tag = '0.1.5',
-- or , branch = '0.1.x', -- or , branch = '0.1.x',
requires = { { 'nvim-lua/plenary.nvim' } } requires = { { 'nvim-lua/plenary.nvim' } }
} }
-- Colours -- Colours
use('ellisonleao/gruvbox.nvim') use('ellisonleao/gruvbox.nvim')
use({ 'rose-pine/neovim', as = 'rose-pine' }) use({ 'rose-pine/neovim', as = 'rose-pine' })
use({ 'bluz71/vim-moonfly-colors', as = 'moonfly' }) use({ 'bluz71/vim-moonfly-colors', as = 'moonfly' })
-- Treesitter -- Treesitter
use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' }) use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
use('nvim-treesitter/playground') use('nvim-treesitter/playground')
-- Editing -- Editing
use('mbbill/undotree') use('mbbill/undotree')
use('tpope/vim-surround') use('tpope/vim-surround')
use('tpope/vim-commentary') use('tpope/vim-commentary')
-- LSP -- LSP
use { use {
'VonHeikemen/lsp-zero.nvim', 'VonHeikemen/lsp-zero.nvim',
branch = 'v2.x', branch = 'v2.x',
requires = { requires = {
-- LSP Support -- LSP Support
{ 'neovim/nvim-lspconfig' }, -- Required { 'neovim/nvim-lspconfig' }, -- Required
{ {
-- Optional -- Optional
'williamboman/mason.nvim', 'williamboman/mason.nvim',
run = function() run = function()
vim.cmd [[MasonUpdate]] vim.cmd [[MasonUpdate]]
end, end,
}, },
{ 'williamboman/mason-lspconfig.nvim' }, -- Optional { 'williamboman/mason-lspconfig.nvim' }, -- Optional
-- Autocompletion -- Autocompletion
{ 'hrsh7th/nvim-cmp' }, -- Required { 'hrsh7th/nvim-cmp' }, -- Required
{ 'hrsh7th/cmp-nvim-lsp' }, -- Required { 'hrsh7th/cmp-nvim-lsp' }, -- Required
{ 'L3MON4D3/LuaSnip' }, -- Required { 'L3MON4D3/LuaSnip' }, -- Required
}, },
use('editorconfig/editorconfig-vim'), use('editorconfig/editorconfig-vim'),
}
-- For centering when I'm writing documents
use { 'smithbm2316/centerpad.nvim' }
}
end) end)

@ -9,23 +9,23 @@ vim.keymap.set("x", "<leader>p", "\"_dP")
-- Enter and space completion -- Enter and space completion
local function enter_complete(seq) local function enter_complete(seq)
local open_seq = string.sub(seq, 1, math.floor(string.len(seq)/2)) local open_seq = string.sub(seq, 1, math.floor(string.len(seq) / 2))
local close_seq = string.sub(seq, math.ceil(string.len(seq)/2)+1, string.len(seq)) local close_seq = string.sub(seq, math.ceil(string.len(seq) / 2) + 1, string.len(seq))
vim.keymap.set( vim.keymap.set(
"i", "i",
string.format("%s<cr>", open_seq), string.format("%s<cr>", open_seq),
string.format("%s<cr>%s<c-o>O", open_seq, close_seq) string.format("%s<cr>%s<c-o>O", open_seq, close_seq)
) )
end end
local function space_complete(seq) local function space_complete(seq)
local open_seq = string.sub(seq, 1, string.len(seq)/2) local open_seq = string.sub(seq, 1, string.len(seq) / 2)
local lefts = string.rep("<left>", string.len(seq)/2) local lefts = string.rep("<left>", string.len(seq) / 2)
vim.keymap.set( vim.keymap.set(
"i", "i",
string.format("%s<space>", open_seq), string.format("%s<space>", open_seq),
string.format("%s%s", seq, lefts) string.format("%s%s", seq, lefts)
) )
end end
enter_complete("{}") enter_complete("{}")
@ -48,3 +48,10 @@ vim.keymap.set("v", "<Leader>c", '"+')
-- Reload config -- Reload config
vim.keymap.set("n", "<leader>rc", ":so $HOME/.config/nvim/init.lua<cr>") vim.keymap.set("n", "<leader>rc", ":so $HOME/.config/nvim/init.lua<cr>")
function WritingMode()
require("centerpad").toggle()
vim.opt.wrap = not vim.opt.wrap
end
vim.keymap.set('n', '<leader>z', ':lua WritingMode()<CR>')

@ -49,8 +49,8 @@ local function save_profiles(threshold)
end end
time([[Luarocks path setup]], true) time([[Luarocks path setup]], true)
local package_path_str = "/home/braydonk/.cache/nvim/packer_hererocks/2.1.1707061634/share/lua/5.1/?.lua;/home/braydonk/.cache/nvim/packer_hererocks/2.1.1707061634/share/lua/5.1/?/init.lua;/home/braydonk/.cache/nvim/packer_hererocks/2.1.1707061634/lib/luarocks/rocks-5.1/?.lua;/home/braydonk/.cache/nvim/packer_hererocks/2.1.1707061634/lib/luarocks/rocks-5.1/?/init.lua" local package_path_str = "/home/braydon/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/braydon/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/braydon/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/braydon/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/braydonk/.cache/nvim/packer_hererocks/2.1.1707061634/lib/lua/5.1/?.so" local install_cpath_pattern = "/home/braydon/.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 if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str package.path = package.path .. ';' .. package_path_str
end end
@ -76,97 +76,102 @@ time([[Defining packer_plugins]], true)
_G.packer_plugins = { _G.packer_plugins = {
LuaSnip = { LuaSnip = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/LuaSnip", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/LuaSnip",
url = "https://github.com/L3MON4D3/LuaSnip" url = "https://github.com/L3MON4D3/LuaSnip"
}, },
["centerpad.nvim"] = {
loaded = true,
path = "/home/braydon/.local/share/nvim/site/pack/packer/start/centerpad.nvim",
url = "https://github.com/smithbm2316/centerpad.nvim"
},
["cmp-nvim-lsp"] = { ["cmp-nvim-lsp"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", path = "/home/braydon/.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"
}, },
["editorconfig-vim"] = { ["editorconfig-vim"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/editorconfig-vim", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/editorconfig-vim",
url = "https://github.com/editorconfig/editorconfig-vim" url = "https://github.com/editorconfig/editorconfig-vim"
}, },
["gruvbox.nvim"] = { ["gruvbox.nvim"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/gruvbox.nvim", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/gruvbox.nvim",
url = "https://github.com/ellisonleao/gruvbox.nvim" url = "https://github.com/ellisonleao/gruvbox.nvim"
}, },
["lsp-zero.nvim"] = { ["lsp-zero.nvim"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
url = "https://github.com/VonHeikemen/lsp-zero.nvim" url = "https://github.com/VonHeikemen/lsp-zero.nvim"
}, },
["mason-lspconfig.nvim"] = { ["mason-lspconfig.nvim"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", path = "/home/braydon/.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.nvim"] = { ["mason.nvim"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/mason.nvim", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/mason.nvim",
url = "https://github.com/williamboman/mason.nvim" url = "https://github.com/williamboman/mason.nvim"
}, },
moonfly = { moonfly = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/moonfly", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/moonfly",
url = "https://github.com/bluz71/vim-moonfly-colors" url = "https://github.com/bluz71/vim-moonfly-colors"
}, },
["nvim-cmp"] = { ["nvim-cmp"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/nvim-cmp", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp" url = "https://github.com/hrsh7th/nvim-cmp"
}, },
["nvim-lspconfig"] = { ["nvim-lspconfig"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig" url = "https://github.com/neovim/nvim-lspconfig"
}, },
["nvim-treesitter"] = { ["nvim-treesitter"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/nvim-treesitter", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/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 = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/packer.nvim", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/packer.nvim",
url = "https://github.com/wbthomason/packer.nvim" url = "https://github.com/wbthomason/packer.nvim"
}, },
playground = { playground = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/playground", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/playground",
url = "https://github.com/nvim-treesitter/playground" url = "https://github.com/nvim-treesitter/playground"
}, },
["plenary.nvim"] = { ["plenary.nvim"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/plenary.nvim", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim" url = "https://github.com/nvim-lua/plenary.nvim"
}, },
["rose-pine"] = { ["rose-pine"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/rose-pine", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/rose-pine",
url = "https://github.com/rose-pine/neovim" url = "https://github.com/rose-pine/neovim"
}, },
["telescope.nvim"] = { ["telescope.nvim"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/telescope.nvim", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim" url = "https://github.com/nvim-telescope/telescope.nvim"
}, },
undotree = { undotree = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/undotree", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/undotree",
url = "https://github.com/mbbill/undotree" url = "https://github.com/mbbill/undotree"
}, },
["vim-commentary"] = { ["vim-commentary"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/vim-commentary", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/vim-commentary",
url = "https://github.com/tpope/vim-commentary" url = "https://github.com/tpope/vim-commentary"
}, },
["vim-surround"] = { ["vim-surround"] = {
loaded = true, loaded = true,
path = "/home/braydonk/.local/share/nvim/site/pack/packer/start/vim-surround", path = "/home/braydon/.local/share/nvim/site/pack/packer/start/vim-surround",
url = "https://github.com/tpope/vim-surround" url = "https://github.com/tpope/vim-surround"
} }
} }

Loading…
Cancel
Save