Fix tmux undercurl. Add neorg config to nvim

This commit is contained in:
Jan Eitzinger 2023-11-17 20:15:04 +01:00
parent 4b140ef518
commit e27d2ef160
4 changed files with 39 additions and 5 deletions

View File

@ -1,3 +1,10 @@
-- Autocmds are automatically loaded on the VeryLazy event -- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua -- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
-- Add any additional autocmds here -- Add any additional autocmds here
vim.api.nvim_create_autocmd("FileType", {
pattern = { "norg" },
callback = function()
vim.opt_local.wrap = true
vim.opt_local.spell = true
end,
})

View File

@ -6,4 +6,16 @@ if vim.g.neovide then
vim.g.neovide_cursor_animation_length = 0 vim.g.neovide_cursor_animation_length = 0
vim.o.guifont = "BrutalistMono Nerd Font Regular:h16" vim.o.guifont = "BrutalistMono Nerd Font Regular:h16"
vim.g.neovide_theme = "dark" vim.g.neovide_theme = "dark"
vim.keymap.set("n", "<D-s>", ":w<CR>") -- Save
vim.keymap.set("v", "<D-c>", '"+y') -- Copy
vim.keymap.set("n", "<D-v>", '"+P') -- Paste normal mode
vim.keymap.set("v", "<D-v>", '"+P') -- Paste visual mode
vim.keymap.set("c", "<D-v>", "<C-R>+") -- Paste command mode
vim.keymap.set("i", "<D-v>", '<ESC>l"+Pli') -- Paste insert mode
end end
-- Allow clipboard copy paste in neovim
vim.api.nvim_set_keymap("", "<D-v>", "+p<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("!", "<D-v>", "<C-R>+", { noremap = true, silent = true })
vim.api.nvim_set_keymap("t", "<D-v>", "<C-R>+", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", "<D-v>", "<C-R>+", { noremap = true, silent = true })

View File

@ -81,17 +81,32 @@ return {
{ {
"nvim-neorg/neorg", "nvim-neorg/neorg",
build = ":Neorg sync-parsers", build = ":Neorg sync-parsers",
dependencies = { "nvim-lua/plenary.nvim" }, dependencies = { { "nvim-lua/plenary.nvim" }, { "nvim-neorg/neorg-telescope" } },
opts = { opts = {
load = { load = {
["core.defaults"] = {}, ["core.defaults"] = {},
["core.concealer"] = {}, -- Adds pretty icons to your documents ["core.concealer"] = {},
["core.completion"] = {
config = {
engine = "nvim-cmp",
name = "[Norg]",
},
},
["core.integrations.nvim-cmp"] = {},
["core.integrations.telescope"] = {},
["core.esupports.metagen"] = {
config = {
type = "auto",
},
},
["core.dirman"] = { -- Manages Neorg workspaces ["core.dirman"] = { -- Manages Neorg workspaces
config = { config = {
workspaces = { workspaces = {
notes = "~/doc/notes/private", notes = "~/doc/notes/private",
work = "~/doc/notes/work", work = "~/doc/notes/work",
}, },
default_workspace = "work",
index = "index.norg",
}, },
}, },
}, },

View File

@ -3,8 +3,8 @@ set -g prefix C-a
bind C-a send-prefix bind C-a send-prefix
set -g base-index 1 set -g base-index 1
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
# Basic functions # Basic functions
bind -n M-n new-window bind -n M-n new-window
@ -52,7 +52,7 @@ set -g display-time 4000
set -g status-interval 5 set -g status-interval 5
# upgrade $TERM # upgrade $TERM
set -g default-terminal "screen-256color" set -g default-terminal "tmux-256color"
set-option -sa terminal-features ',{{ .term }}:RGB' set-option -sa terminal-features ',{{ .term }}:RGB'
# emacs key bindings in tmux command prompt (prefix + :) are better than # emacs key bindings in tmux command prompt (prefix + :) are better than