A ton of changes I forgot to commit
This commit is contained in:
parent
f981cb55e9
commit
67fc636397
|
@ -87,8 +87,42 @@ Table of my own keybinds. Here as documentation for myself. I am yet to include
|
||||||
|
|
||||||
Documentation for myself
|
Documentation for myself
|
||||||
|
|
||||||
| Keybind | Description | Plugins |
|
| Keybind | Description | Plugins |
|
||||||
| ------- | ----------------------- | ------------ |
|
| ------- | ----------------------- | ------- |
|
||||||
| zz | Center the current line | |
|
| zz | Center the current line | |
|
||||||
| gcc | Comment line | nvim-comment |
|
|
||||||
| gc | Comment selection | nvim-comment |
|
## Important plugins I use the default mappins of
|
||||||
|
|
||||||
|
- paperplanes
|
||||||
|
|
||||||
|
| Keybind | Description |
|
||||||
|
| ------- | ------------------------- |
|
||||||
|
| :PP | Create pastebin-like link |
|
||||||
|
|
||||||
|
- nvim-comment
|
||||||
|
|
||||||
|
| Keybind | Description |
|
||||||
|
| ------- | ----------------- |
|
||||||
|
| gcc | Comment line |
|
||||||
|
| gc | Comment selection |
|
||||||
|
|
||||||
|
- neogit
|
||||||
|
|
||||||
|
| Keybind | Description |
|
||||||
|
| ------- | ----------- |
|
||||||
|
| C-g | Open neogit |
|
||||||
|
|
||||||
|
- gitlinker
|
||||||
|
|
||||||
|
| Keybind | Description |
|
||||||
|
| ---------- | ------------------ |
|
||||||
|
| <leader>gy | Create remote link |
|
||||||
|
|
||||||
|
- nvim-surround
|
||||||
|
|
||||||
|
| Keybind | Description | Mode |
|
||||||
|
| -------- | ----------------------------------- | ---- |
|
||||||
|
| cs[a][b] | Change surrounding pair from a to b | n |
|
||||||
|
| ds[a] | Delete surrounding pair of a | n |
|
||||||
|
| ys[m][a] | Surround the motion m with a | n |
|
||||||
|
| S[a] | Surround selected code with a | v |
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
vim.cmd("syntax hkf")
|
|
||||||
vim.api.nvim_buf_set_option(0, "commentstring", "-- %s")
|
vim.api.nvim_buf_set_option(0, "commentstring", "-- %s")
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
local A = require("my.abbreviations")
|
local A = require("my.abbreviations")
|
||||||
|
|
||||||
|
require("my.helpers.wrapMovement").setup()
|
||||||
|
|
||||||
vim.opt.conceallevel = 1
|
vim.opt.conceallevel = 1
|
||||||
vim.opt.wrap = true
|
vim.opt.wrap = true
|
||||||
|
|
||||||
|
@ -9,6 +11,7 @@ local abbreviations = {
|
||||||
-- Greek chars
|
-- Greek chars
|
||||||
{ "eps", "\\epsilon" },
|
{ "eps", "\\epsilon" },
|
||||||
{ "delta", "\\delta" },
|
{ "delta", "\\delta" },
|
||||||
|
{ "nuls", "\\varnothing" },
|
||||||
|
|
||||||
-- Exponents
|
-- Exponents
|
||||||
{ "en1", "^{-1}" },
|
{ "en1", "^{-1}" },
|
||||||
|
@ -18,6 +21,8 @@ local abbreviations = {
|
||||||
{ "e3", "^{3}" },
|
{ "e3", "^{3}" },
|
||||||
{ "e4", "^{4}" },
|
{ "e4", "^{4}" },
|
||||||
{ "en", "^{n}" },
|
{ "en", "^{n}" },
|
||||||
|
{ "enn", "^{-}" },
|
||||||
|
{ "epp", "^{+}" },
|
||||||
|
|
||||||
-- Subscripts
|
-- Subscripts
|
||||||
{ "s0", "_{0}" },
|
{ "s0", "_{0}" },
|
||||||
|
@ -35,10 +40,13 @@ local abbreviations = {
|
||||||
|
|
||||||
-- Basic commands
|
-- Basic commands
|
||||||
{ "leq", "\\leq" },
|
{ "leq", "\\leq" },
|
||||||
|
{ "sst", "\\subset" },
|
||||||
|
{ "sseq", "\\subseteq" },
|
||||||
{ "neq", "\\neq" },
|
{ "neq", "\\neq" },
|
||||||
{ "nin", "\\not\\in" },
|
{ "nin", "\\not\\in" },
|
||||||
{ "iin", "\\in" },
|
{ "iin", "\\in" },
|
||||||
{ "tto", "\\to" },
|
{ "tto", "\\to" },
|
||||||
|
{ "iip", "\\implies" },
|
||||||
{ "iff", "\\iff" },
|
{ "iff", "\\iff" },
|
||||||
{ "land", "\\land" },
|
{ "land", "\\land" },
|
||||||
{ "lor", "\\lor" },
|
{ "lor", "\\lor" },
|
||||||
|
|
|
@ -20,8 +20,17 @@ function M.mapSilent(mode, lhs, rhs, opts)
|
||||||
map(mode, lhs, rhs, options)
|
map(mode, lhs, rhs, options)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Performs a basic move operation
|
||||||
|
function M.move(from, to)
|
||||||
|
vim.keymap.set("n", to, from)
|
||||||
|
vim.keymap.set("n", from, "<Nop>")
|
||||||
|
end
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
vim.keymap.set("n", "qq", ":wq<cr>") -- Save and quit
|
M.move("q", "yq")
|
||||||
|
M.move("Q", "yQ")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "Q", ":wqa<cr>") -- Save and quit
|
||||||
|
|
||||||
-- Create chords
|
-- Create chords
|
||||||
if arpeggio ~= nil then
|
if arpeggio ~= nil then
|
||||||
|
|
|
@ -54,6 +54,7 @@ function M.setup()
|
||||||
"anuvyklack/hydra.nvim", -- keybinds where you only hit the head once
|
"anuvyklack/hydra.nvim", -- keybinds where you only hit the head once
|
||||||
"jbyuki/venn.nvim", -- draw ascii diagrams
|
"jbyuki/venn.nvim", -- draw ascii diagrams
|
||||||
"hrsh7th/cmp-omni", -- omnifunc source for cmp
|
"hrsh7th/cmp-omni", -- omnifunc source for cmp
|
||||||
|
"ekickx/clipboard-image.nvim", -- paste images from clipbaord
|
||||||
|
|
||||||
-- Git stuff
|
-- Git stuff
|
||||||
"ruifm/gitlinker.nvim", -- generate permalinks for code
|
"ruifm/gitlinker.nvim", -- generate permalinks for code
|
||||||
|
@ -64,6 +65,7 @@ function M.setup()
|
||||||
if os.getenv("NVIM_INSTALL_TREESITTER") then
|
if os.getenv("NVIM_INSTALL_TREESITTER") then
|
||||||
table.insert(base, 2, { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" })
|
table.insert(base, 2, { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" })
|
||||||
end
|
end
|
||||||
|
table.insert(base, 2, { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" })
|
||||||
|
|
||||||
for _, v in ipairs(themePackages) do
|
for _, v in ipairs(themePackages) do
|
||||||
-- append package in the base list
|
-- append package in the base list
|
||||||
|
|
|
@ -4,24 +4,24 @@ local arpeggio = vim.fn["arpeggio#map"]
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.chord(mode, lhs, rhs, opts)
|
function M.chord(mode, lhs, rhs, opts)
|
||||||
if string.len(mode) > 1 then
|
if string.len(mode) > 1 then
|
||||||
for i = 1, #mode do
|
for i = 1, #mode do
|
||||||
local c = mode:sub(i, i)
|
local c = mode:sub(i, i)
|
||||||
M.chord(c, lhs, rhs, opts)
|
M.chord(c, lhs, rhs, opts)
|
||||||
end
|
|
||||||
else
|
|
||||||
local options = helpers.mergeTables(opts, {noremap = true})
|
|
||||||
local settings = options.settings or ""
|
|
||||||
|
|
||||||
if options.silent then settings = settings .. "s" end
|
|
||||||
|
|
||||||
arpeggio(mode, settings, options.noremap, lhs, rhs)
|
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
local options = helpers.mergeTables(opts, { noremap = true })
|
||||||
|
local settings = options.settings or ""
|
||||||
|
|
||||||
|
if options.silent then settings = settings .. "s" end
|
||||||
|
|
||||||
|
arpeggio(mode, settings, options.noremap, lhs, rhs)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.chordSilent(mode, lhs, rhs, opts)
|
function M.chordSilent(mode, lhs, rhs, opts)
|
||||||
local options = helpers.mergeTables(opts, {silent = true})
|
local options = helpers.mergeTables(opts, { silent = true })
|
||||||
M.chord(mode, lhs, rhs, options)
|
M.chord(mode, lhs, rhs, options)
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -13,7 +13,6 @@ end
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
require 'clipboard-image'.setup {
|
require 'clipboard-image'.setup {
|
||||||
|
|
||||||
default = {
|
default = {
|
||||||
img_name = img_name
|
img_name = img_name
|
||||||
},
|
},
|
||||||
|
|
|
@ -21,11 +21,13 @@ function M.setup()
|
||||||
require("my.plugins.vimux").setup()
|
require("my.plugins.vimux").setup()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
require("my.plugins.easymotion").setup()
|
||||||
require("my.plugins.autopairs").setup()
|
require("my.plugins.autopairs").setup()
|
||||||
require("my.plugins.paperplanes").setup()
|
require("my.plugins.paperplanes").setup()
|
||||||
require("my.plugins.neogit").setup()
|
require("my.plugins.neogit").setup()
|
||||||
require("my.plugins.telescope").setup()
|
require("my.plugins.telescope").setup()
|
||||||
require("my.plugins.venn").setup()
|
require("my.plugins.venn").setup()
|
||||||
|
require("my.plugins.clipboard-image").setup()
|
||||||
|
|
||||||
-- require("my.plugins.idris").setup()
|
-- require("my.plugins.idris").setup()
|
||||||
-- require("which-key").setup()
|
-- require("which-key").setup()
|
||||||
|
|
|
@ -16,7 +16,7 @@ function M.on_attach(client, bufnr)
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
group = vim.api.nvim_create_augroup("LspFormatting", {}),
|
group = vim.api.nvim_create_augroup("LspFormatting", {}),
|
||||||
callback = vim.lsp.buf.formatting_sync
|
callback = vim.lsp.buf.format
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ function M.setup()
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = false,
|
enable = true,
|
||||||
|
|
||||||
disable = { "kotlin", "tex" },
|
disable = { "kotlin", "tex" },
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@ if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
echom "Our syntax highlighting code will go here."
|
|
||||||
|
|
||||||
syntax keyword kfKeyword alias template layer using path name input output assume fun as import exporting module unsafe def
|
syntax keyword kfKeyword alias template layer using path name input output assume fun as import exporting module unsafe def
|
||||||
syntax keyword kfFunction LayerTemplate Sequence Chord Keycode Layer Broken
|
syntax keyword kfFunction LayerTemplate Sequence Chord Keycode Layer Broken
|
||||||
|
|
||||||
|
@ -31,4 +29,4 @@ highlight link kfComment Comment
|
||||||
highlight link kfOperator Operator
|
highlight link kfOperator Operator
|
||||||
highlight link kfString String
|
highlight link kfString String
|
||||||
|
|
||||||
let b:current_syntax = "kf"
|
let b:current_syntax = "hkf"
|
||||||
|
|
|
@ -6,6 +6,9 @@ bind C-a send-prefix
|
||||||
# don't rename windows automatically
|
# don't rename windows automatically
|
||||||
set-option -g allow-rename off
|
set-option -g allow-rename off
|
||||||
|
|
||||||
|
# Fix slow esc
|
||||||
|
set -sg escape-time 10
|
||||||
|
|
||||||
# Visual stuff
|
# Visual stuff
|
||||||
set -g default-terminal "screen-256color"
|
set -g default-terminal "screen-256color"
|
||||||
# set -ga terminal-overrides ",screen-256color:Tc"
|
# set -ga terminal-overrides ",screen-256color:Tc"
|
||||||
|
|
|
@ -48,6 +48,11 @@
|
||||||
"description": "Subscript",
|
"description": "Subscript",
|
||||||
"body": "_{$1}$0"
|
"body": "_{$1}$0"
|
||||||
},
|
},
|
||||||
|
"Exponent": {
|
||||||
|
"prefix": "ee",
|
||||||
|
"description": "Exponent",
|
||||||
|
"body": "^{$1}$0"
|
||||||
|
},
|
||||||
"Section": {
|
"Section": {
|
||||||
"prefix": "section",
|
"prefix": "section",
|
||||||
"description": "Add section",
|
"description": "Add section",
|
||||||
|
|
|
@ -67,7 +67,7 @@ in
|
||||||
home-manager.users.adrielus =
|
home-manager.users.adrielus =
|
||||||
{
|
{
|
||||||
home.file.".local/share/nvim/site/pack/paqs/start/paq-nvim".source = paq;
|
home.file.".local/share/nvim/site/pack/paqs/start/paq-nvim".source = paq;
|
||||||
home.file.".local/share/nvim/site/pack/treesitter/start/nvim-treesitter".source = nvim-treesitter;
|
# home.file.".local/share/nvim/site/pack/treesitter/start/nvim-treesitter".source = nvim-treesitter;
|
||||||
xdg.configFile."nvim/init.lua".text = myConfig;
|
xdg.configFile."nvim/init.lua".text = myConfig;
|
||||||
xdg.configFile."nvim/lua/my/theme.lua".source = theme.neovim.theme;
|
xdg.configFile."nvim/lua/my/theme.lua".source = theme.neovim.theme;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue