Org mode / quality of life stuff

This commit is contained in:
agryphus 2023-09-25 17:06:11 -04:00
parent 332ff948ed
commit 150e21702e
12 changed files with 238 additions and 3 deletions

4
after/ftplugin/norg.lua Normal file
View file

@ -0,0 +1,4 @@
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2

View file

@ -38,6 +38,111 @@ require("no-clown-fiesta").setup({
transparent = true, transparent = true,
}) })
require('rose-pine').setup({
--- @usage 'auto'|'main'|'moon'|'dawn'
variant = 'auto',
--- @usage 'main'|'moon'|'dawn'
dark_variant = 'main',
bold_vert_split = false,
dim_nc_background = false,
disable_background = true,
disable_float_background = false,
disable_italics = true,
--- @usage string hex value or named color from rosepinetheme.com/palette
groups = {
background = 'base',
background_nc = '_experimental_nc',
panel = 'surface',
panel_nc = 'base',
border = 'highlight_med',
comment = 'muted',
link = 'iris',
punctuation = 'subtle',
error = 'love',
hint = 'iris',
info = 'foam',
warn = 'gold',
headings = {
h1 = 'iris',
h2 = 'foam',
h3 = 'rose',
h4 = 'gold',
h5 = 'pine',
h6 = 'foam',
}
-- or set all headings at once
-- headings = 'subtle'
},
-- Change specific vim highlight groups
-- https://github.com/rose-pine/neovim/wiki/Recipes
highlight_groups = {
ColorColumn = { bg = 'rose' },
-- Blend colours against the "base" background
CursorLine = { bg = 'foam', blend = 10 },
StatusLine = { fg = 'love', bg = 'love', blend = 10 },
-- By default each group adds to the existing config.
-- If you only want to set what is written in this config exactly,
-- you can set the inherit option:
Search = { bg = 'gold', inherit = false },
}
})
require("gruvbox").setup({
undercurl = true,
underline = true,
bold = true,
italic = {
strings = true,
comments = true,
operators = false,
folds = true,
},
strikethrough = true,
invert_selection = false,
invert_signs = false,
invert_tabline = false,
invert_intend_guides = false,
inverse = true, -- invert background for search, diffs, statuslines and errors
contrast = "", -- can be "hard", "soft" or empty string
palette_overrides = {},
overrides = {},
dim_inactive = false,
transparent_mode = true,
})
local c = require('vscode.colors').get_colors()
require('vscode').setup({
-- Alternatively set style in setup
-- style = 'light'
-- Enable transparent background
transparent = true,
-- Enable italic comment
italic_comments = true,
-- Disable nvim-tree background color
disable_nvimtree_bg = true,
-- Override colors (see ./lua/vscode/colors.lua)
color_overrides = {
-- vscLineNumber = '#FFFFFF',
},
-- Override highlight groups (see ./lua/vscode/theme.lua)
group_overrides = {
-- this supports the same val table as vim.api.nvim_set_hl
-- use colors from this colorscheme by requiring vscode.colors!
Cursor = { fg=c.vscDarkBlue, bg=c.vscLightGreen, bold=true },
}
})
vim.cmd[[ vim.cmd[[
let s:base03 = [ '#151513', 233 ] let s:base03 = [ '#151513', 233 ]
let s:base02 = [ '#202020', 236 ] let s:base02 = [ '#202020', 236 ]

View file

View file

@ -7,7 +7,7 @@ vim.g.firenvim_config = {
priority = 0, priority = 0,
selector = "textarea", selector = "textarea",
takeover = "never" takeover = "never"
} },
} }
} }
@ -16,3 +16,8 @@ if vim.g.started_by_firenvim == true then
vim.opt.scrolloff = 0 vim.opt.scrolloff = 0
end end
vim.api.nvim_create_autocmd({'BufEnter'}, {
pattern = "localhost_*.txt",
command = "set filetype=python"
})

8
after/plugin/lf.lua Normal file
View file

@ -0,0 +1,8 @@
vim.keymap.set("n", "<leader>e", function ()
vim.g.lf_command_override = string.format('LF_OVERRIDE_X=%d LF_OVERRIDE_Y=%d lf',
math.floor(vim.go.columns * 0.5),
math.ceil(vim.go.lines * 0.25)
)
vim.cmd("Lf")
end)

20
after/plugin/neorg.lua Normal file
View file

@ -0,0 +1,20 @@
require('neorg').setup {
load = {
["core.defaults"] = {},
["core.concealer"] = {},
["core.dirman"] = {
config = {
workspaces = {
notes = "~/dox/norg/notes",
school = "~/school/",
},
},
},
},
}
vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, {
pattern = {"*.norg"},
command = "set conceallevel=3"
})

View file

@ -3,7 +3,7 @@ vim.opt.termguicolors = true
require("nvim-tree").setup() require("nvim-tree").setup()
vim.keymap.set("n", "<leader>pt", ":NvimTreeToggle<CR>") vim.keymap.set("n", "<leader>pt", vim.cmd.NvimTreeToggle)
-- sets transparent background -- sets transparent background
vim.cmd[[hi NvimTreeNormal guibg=NONE ctermbg=NONE]] vim.cmd[[hi NvimTreeNormal guibg=NONE ctermbg=NONE]]

View file

@ -1,8 +1,10 @@
local builtin = require("telescope.builtin") local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>pf", builtin.find_files, {}) vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
vim.keymap.set("n", "<leader>ps", function() vim.keymap.set("n", "<leader>ps", function()
builtin.grep_string({ search = vim.fn.input("Grep > ") }) builtin.grep_string({ search = vim.fn.input("Grep > ") })
end) end)
vim.keymap.set("n", "<leader>ht", builtin.colorscheme, {})
require("telescope").setup{ require("telescope").setup{
defaults = { defaults = {

View file

@ -0,0 +1,2 @@
vim.keymap.set("n", "<leader>ut", vim.cmd.UndotreeToggle)

62
after/plugin/zenmode.lua Normal file
View file

@ -0,0 +1,62 @@
require('zen-mode').setup {
window = {
backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
-- height and width can be:
-- * an absolute number of cells when > 1
-- * a percentage of the width / height of the editor when <= 1
-- * a function that returns the width or the height
width = 120, -- width of the Zen window
height = 1, -- height of the Zen window
-- by default, no options are changed for the Zen window
-- uncomment any of the options below, or add other vim.wo options you want to apply
options = {
signcolumn = "no", -- disable signcolumn
number = false, -- disable number column
relativenumber = false, -- disable relative numbers
cursorline = false, -- disable cursorline
cursorcolumn = false, -- disable cursor column
foldcolumn = "0", -- disable fold column
-- list = false, -- disable whitespace characters
},
},
plugins = {
-- disable some global vim options (vim.o...)
-- comment the lines to not apply the options
options = {
enabled = true,
ruler = false, -- disables the ruler text in the cmd line area
showcmd = false, -- disables the command in the last line of the screen
},
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
gitsigns = { enabled = false }, -- disables git signs
tmux = { enabled = false }, -- disables the tmux statusline
-- this will change the font size on kitty when in zen mode
-- to make this work, you need to set the following kitty options:
-- - allow_remote_control socket-only
-- - listen_on unix:/tmp/kitty
kitty = {
enabled = false,
font = "+4", -- font size increment
},
-- this will change the font size on alacritty when in zen mode
-- requires Alacritty Version 0.10.0 or higher
-- uses `alacritty msg` subcommand to change font size
alacritty = {
enabled = false,
font = "14", -- font size
},
-- this will change the font size on wezterm when in zen mode
-- See alse also the Plugins/Wezterm section in this projects README
wezterm = {
enabled = false,
-- can be either an absolute font size or the number of incremental steps
font = "+4", -- (10% increase per step)
},
},
-- callback where you can add custom code when the Zen window opens
on_open = function(win)
end,
-- callback where you can add custom code when the Zen window closes
on_close = function()
end,
}

View file

@ -9,6 +9,27 @@ return require("packer").startup(function(use)
run = ":Neorg sync-parsers", run = ":Neorg sync-parsers",
} }
-- Dashboard
use {
'glepnir/dashboard-nvim',
event = 'VimEnter',
requires = {'nvim-tree/nvim-web-devicons'},
config = function()
require('dashboard').setup {
-- config
}
end,
}
-- File manager in nvim
use {
"ptzz/lf.vim",
requires = { {"voldikss/vim-floaterm"} },
}
-- Zen mode
use "folke/zen-mode.nvim"
-- Find files and strings -- Find files and strings
use { use {
"nvim-telescope/telescope.nvim", tag = "0.1.0", "nvim-telescope/telescope.nvim", tag = "0.1.0",
@ -20,6 +41,9 @@ return require("packer").startup(function(use)
-- Themes -- Themes
use "aktersnurra/no-clown-fiesta.nvim" use "aktersnurra/no-clown-fiesta.nvim"
use "ellisonleao/gruvbox.nvim"
use { 'rose-pine/neovim', as = 'rose-pine' }
use 'Mofiqul/vscode.nvim'
-- Referencing a hex code highlights it in that color -- Referencing a hex code highlights it in that color
use "lilydjwg/colorizer" use "lilydjwg/colorizer"
@ -27,6 +51,9 @@ return require("packer").startup(function(use)
-- Relative line numbers disappear when not actively in buffer -- Relative line numbers disappear when not actively in buffer
use "jeffkreeftmeijer/vim-numbertoggle" use "jeffkreeftmeijer/vim-numbertoggle"
-- History visualizer
use "mbbill/undotree"
-- See function signatures when typing them -- See function signatures when typing them
use "ray-x/lsp_signature.nvim" use "ray-x/lsp_signature.nvim"
require "lsp_signature".setup({}) require "lsp_signature".setup({})

View file

@ -1,4 +1,4 @@
vim.opt.guicursor = "" -- vim.opt.guicursor = ""
vim.opt.nu = true vim.opt.nu = true
vim.opt.relativenumber = true vim.opt.relativenumber = true