1
Fork 0

A ton of changes I forgot to commit

This commit is contained in:
Matei Adriel 2022-09-12 13:50:02 +02:00
parent f981cb55e9
commit 67fc636397
14 changed files with 87 additions and 28 deletions

View file

@ -88,7 +88,41 @@ Table of my own keybinds. Here as documentation for myself. I am yet to include
Documentation for myself
| Keybind | Description | Plugins |
| ------- | ----------------------- | ------------ |
| ------- | ----------------------- | ------- |
| 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 |

View file

@ -1,2 +1 @@
vim.cmd("syntax hkf")
vim.api.nvim_buf_set_option(0, "commentstring", "-- %s")

View file

@ -1,5 +1,7 @@
local A = require("my.abbreviations")
require("my.helpers.wrapMovement").setup()
vim.opt.conceallevel = 1
vim.opt.wrap = true
@ -9,6 +11,7 @@ local abbreviations = {
-- Greek chars
{ "eps", "\\epsilon" },
{ "delta", "\\delta" },
{ "nuls", "\\varnothing" },
-- Exponents
{ "en1", "^{-1}" },
@ -18,6 +21,8 @@ local abbreviations = {
{ "e3", "^{3}" },
{ "e4", "^{4}" },
{ "en", "^{n}" },
{ "enn", "^{-}" },
{ "epp", "^{+}" },
-- Subscripts
{ "s0", "_{0}" },
@ -35,10 +40,13 @@ local abbreviations = {
-- Basic commands
{ "leq", "\\leq" },
{ "sst", "\\subset" },
{ "sseq", "\\subseteq" },
{ "neq", "\\neq" },
{ "nin", "\\not\\in" },
{ "iin", "\\in" },
{ "tto", "\\to" },
{ "iip", "\\implies" },
{ "iff", "\\iff" },
{ "land", "\\land" },
{ "lor", "\\lor" },

View file

@ -20,8 +20,17 @@ function M.mapSilent(mode, lhs, rhs, opts)
map(mode, lhs, rhs, options)
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()
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
if arpeggio ~= nil then

View file

@ -54,6 +54,7 @@ function M.setup()
"anuvyklack/hydra.nvim", -- keybinds where you only hit the head once
"jbyuki/venn.nvim", -- draw ascii diagrams
"hrsh7th/cmp-omni", -- omnifunc source for cmp
"ekickx/clipboard-image.nvim", -- paste images from clipbaord
-- Git stuff
"ruifm/gitlinker.nvim", -- generate permalinks for code
@ -64,6 +65,7 @@ function M.setup()
if os.getenv("NVIM_INSTALL_TREESITTER") then
table.insert(base, 2, { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" })
end
table.insert(base, 2, { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" })
for _, v in ipairs(themePackages) do
-- append package in the base list

View file

@ -13,7 +13,6 @@ end
function M.setup()
require 'clipboard-image'.setup {
default = {
img_name = img_name
},

View file

@ -21,11 +21,13 @@ function M.setup()
require("my.plugins.vimux").setup()
end)
require("my.plugins.easymotion").setup()
require("my.plugins.autopairs").setup()
require("my.plugins.paperplanes").setup()
require("my.plugins.neogit").setup()
require("my.plugins.telescope").setup()
require("my.plugins.venn").setup()
require("my.plugins.clipboard-image").setup()
-- require("my.plugins.idris").setup()
-- require("which-key").setup()

View file

@ -16,7 +16,7 @@ function M.on_attach(client, bufnr)
vim.api.nvim_create_autocmd("BufWritePre", {
group = vim.api.nvim_create_augroup("LspFormatting", {}),
callback = vim.lsp.buf.formatting_sync
callback = vim.lsp.buf.format
})
end

View file

@ -10,7 +10,7 @@ function M.setup()
sync_install = false,
indent = { enable = true },
highlight = {
enable = false,
enable = true,
disable = { "kotlin", "tex" },

View file

@ -2,8 +2,6 @@ if exists("b:current_syntax")
finish
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 kfFunction LayerTemplate Sequence Chord Keycode Layer Broken
@ -31,4 +29,4 @@ highlight link kfComment Comment
highlight link kfOperator Operator
highlight link kfString String
let b:current_syntax = "kf"
let b:current_syntax = "hkf"

View file

@ -6,6 +6,9 @@ bind C-a send-prefix
# don't rename windows automatically
set-option -g allow-rename off
# Fix slow esc
set -sg escape-time 10
# Visual stuff
set -g default-terminal "screen-256color"
# set -ga terminal-overrides ",screen-256color:Tc"

View file

@ -48,6 +48,11 @@
"description": "Subscript",
"body": "_{$1}$0"
},
"Exponent": {
"prefix": "ee",
"description": "Exponent",
"body": "^{$1}$0"
},
"Section": {
"prefix": "section",
"description": "Add section",

View file

@ -67,7 +67,7 @@ in
home-manager.users.adrielus =
{
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/lua/my/theme.lua".source = theme.neovim.theme;