Compare commits

..

No commits in common. "8c512a2572d1217f06a99920eb77ba2c6b7c2572" and "8a589625639b440b0c10e1c85d539d39ca09a23d" have entirely different histories.

8 changed files with 132 additions and 22 deletions

6
.gitmodules vendored
View File

@ -23,6 +23,12 @@
path = src/.local/share/nvim/site/pack/3pp/start/plenary.nvim path = src/.local/share/nvim/site/pack/3pp/start/plenary.nvim
url = https://github.com/nvim-lua/plenary.nvim.git url = https://github.com/nvim-lua/plenary.nvim.git
# url motions
# init.lua
[submodule "src/.local/share/nvim/site/pack/3pp/start/urlview.nvim"]
path = src/.local/share/nvim/site/pack/3pp/start/urlview.nvim
url = https://github.com/axieax/urlview.nvim
# git symbols in the gutter # git symbols in the gutter
[submodule "src/.local/share/nvim/site/pack/3pp/start/vim-gitgutter"] [submodule "src/.local/share/nvim/site/pack/3pp/start/vim-gitgutter"]
path = src/.local/share/nvim/site/pack/3pp/start/vim-gitgutter path = src/.local/share/nvim/site/pack/3pp/start/vim-gitgutter

View File

@ -9,8 +9,8 @@ size = 10
[colors] [colors]
[colors.normal] [colors.normal]
black = "#000000" black = "#000000"
red = "#949494" red = "#454545"
green = "#505050" green = "#949494"
yellow = "#a7a7a7" yellow = "#a7a7a7"
blue = "#56698a" blue = "#56698a"
magenta = "#d5d5d5" magenta = "#d5d5d5"

View File

@ -1,2 +0,0 @@
[global]
check_update=false

View File

@ -94,20 +94,20 @@ local on_attach = function(client, bufnr)
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
local opts = { noremap=true, silent=true } local opts = { noremap=true, silent=true }
keymap('gD', vim.lsp.buf.declaration, opts) buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
keymap('gd', vim.lsp.buf.definition, opts) buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
keymap('gK', vim.lsp.buf.hover, opts) buf_set_keymap('n', 'gK', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
keymap('gi', vim.lsp.buf.implementation, opts) buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
keymap('gs', vim.lsp.buf.signature_help, opts) buf_set_keymap('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
keymap('gt', vim.lsp.buf.type_definition, opts) buf_set_keymap('n', 'gt', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
keymap('<space>rn', vim.lsp.buf.rename, opts) buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
keymap('<space>ss', vim.lsp.buf.workspace_symbol, opts) buf_set_keymap('n', '<space>ss', '<cmd>lua vim.lsp.buf.workspace_symbol()<CR>', opts)
keymap('gr', vim.lsp.buf.references, opts) buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
keymap('<space>e', vim.lsp.diagnostic.show_line_diagnostics, opts) buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
keymap('[d', vim.lsp.diagnostic.goto_prev, opts) buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
keymap(']d', vim.lsp.diagnostic.goto_next, opts) buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
keymap('<space>ca', vim.lsp.buf.code_action, opts) buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
keymap('<space>f', vim.lsp.buf.format, opts) buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.format()<CR>', opts)
end end
-- table declares LSPs to be set up -- table declares LSPs to be set up

View File

@ -11,6 +11,16 @@ dotprofile, profile_table = confutil.dotprofile, confutil.profile_table
-------------------------------- --------------------------------
-------------------------------- --------------------------------
------
-- url motions
-- plug: urlview.nvim
------
require("urlview").setup({
jump = {
prev = "<leader>uj",
next = "<leader>uh",
},
})
-- bind to copy URL under cursor -- bind to copy URL under cursor
keymap("<leader>uu", ":let @+ = expand('<cfile>')<cr>") keymap("<leader>uu", ":let @+ = expand('<cfile>')<cr>")
@ -23,21 +33,22 @@ require('dressing').setup({
insert_only = false, insert_only = false,
} }
}) })
keymap("<leader>ef", "<cmd>Telescope find_files<cr>") keymap("<leader>ef", "<cmd>Telescope find_files<cr>")
keymap("<leader>eg", "<cmd>Telescope live_grep<cr>") keymap("<leader>eg", "<cmd>Telescope live_grep<cr>")
keymap("<leader>em", "<cmd>Telescope buffers<cr>") keymap("<leader>em", "<cmd>Telescope buffers<cr>")
keymap("<leader>eh", "<cmd>Telescope help_tags<cr>") keymap("<leader>eh", "<cmd>Telescope help_tags<cr>")
keymap("<leader>es", "<cmd>Telescope lsp_dynamic_workspace_symbols<cr>") keymap("<leader>es", "<cmd>Telescope lsp_document_symbols<cr>")
keymap("<leader>eb", "<cmd>Telescope keymaps<cr>") keymap("<leader>eb", "<cmd>Telescope keymaps<cr>")
require("theme")
-------------------------------- --------------------------------
-------------------------------- --------------------------------
-- imports (see .config/nvim/lua/) -- imports (see .config/nvim/lua/)
-------------------------------- --------------------------------
-------------------------------- --------------------------------
require("theme")
if dotprofile >= profile_table.DEFAULT then if dotprofile >= profile_table.DEFAULT then
require("coding") require("coding")
require("debugging") require("debugging")

View File

@ -9,6 +9,67 @@ snippet problem "template for problem notes" bi
endsnippet endsnippet
snippet index "template for index documents" bi
#import "/templates/index.typ": template, lref
#import "/templates/libs.typ": *
#show: template.with(
title: "$1",
)
endsnippet
snippet sfd "template for lecture notes" bi
#import "/templates/sfd.typ": template, lref
#import "/templates/libs.typ": *
#show: template.with(
lecture_url: "$1",
title: "$2",
)
endsnippet
snippet chem "template for chemistry notes" bi
#import "/templates/chem.typ": template, lref, chem, gaz, liq, sol, aq
#import "/templates/libs.typ": *
#show: template.with(
title: "$1",
)
endsnippet
snippet chi "chemistry math inline" w
#chem()[$$1$]
endsnippet
snippet chbl "chemistry math block" w
#chem(block: true)[$$1$]
endsnippet
snippet numb "numbered math block" w
#numbered_eq()[
$$1$
<$2>
]
endsnippet
snippet contest "template for contest problems" bi
#import "/templates/contest.typ": template, source_code, status, lref
#import "/templates/libs.typ": *
#show: template.with(
title: "$1",
stat: "${2:incomplete}",
)
endsnippet
snippet algs "template for compsci notes" bi
#import "/templates/algs.typ": template, source_code, lref
#import "/templates/libs.typ": *
#show: template.with(
title: "$1",
)
endsnippet
snippet general "general template" bi snippet general "general template" bi
#import "/templates/general.typ": template, lref #import "/templates/general.typ": template, lref
#import "/templates/libs.typ": * #import "/templates/libs.typ": *
@ -18,6 +79,33 @@ snippet general "general template" bi
endsnippet endsnippet
snippet math_prob "template for math problems" bi
#import "/templates/math_prob.typ": template, lref
#import "/templates/libs.typ": *
#show: template.with(
title: "$1",
)
endsnippet
snippet math_notes "template for math notes" bi
#import "/templates/math_notes.typ": template, lref
#import "/templates/libs.typ": *
#show: template.with(
title: "$1",
)
endsnippet
snippet proj "template for project documents" bi
#import "/templates/proj.typ": template, lref
#import "/templates/libs.typ": *
#show: template.with(
title: "$1",
)
endsnippet
snippet ss "superscript" i snippet ss "superscript" i
^($1) ^($1)
endsnippet endsnippet
@ -26,6 +114,10 @@ snippet link "link" w
#link("${1}")[${2}] #link("${1}")[${2}]
endsnippet endsnippet
snippet lref "refer to another knowledge base doc" w
#lref("/${1}")[${2}]
endsnippet
snippet fig "create new figure" bi snippet fig "create new figure" bi
#figure( #figure(
image("fig/`!v expand("%:r")`/$1.svg"), image("fig/`!v expand("%:r")`/$1.svg"),
@ -40,11 +132,12 @@ snippet figp "create new image figure" bi
) <$1> ) <$1>
endsnippet endsnippet
snippet tabl "create new table" bi snippet tabl "create new tablex table" bi
#figure( #figure(
tablef(columns: $1, tablef(columns: $1,
$0 $0
), ),
caption: [$2], caption: [$2],
kind: table,
) <$3> ) <$3>
endsnippet endsnippet

@ -0,0 +1 @@
Subproject commit 7d622e11adbc2cac5bba62345ade9b6672d564a4

@ -0,0 +1 @@
Subproject commit def092693ea33eb2055fb2cfbcabb8e56ea77963