dotfiles
bugabingas dorkfiles
owned by bugabinga
sync
97f822f8e283f25d40a3bf7250890879f50b4e2d
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (5)
environment.d/path.conf
Addednew file mode 100644 1 +CARGO_HOME = /home/oli/.cargo
2 +PATH = $CARGO_HOME/bin:$PATH
new file mode 100644 14 +monitor = ,preferred,auto,auto
neovim/lua/bugabinga/plugins/autotag.lua
Addednew file mode 100644 2 + 'windwp/nvim-ts-autotag',
6 + enable_close_on_tag =
true,
neovim/lua/bugabinga/plugins/textobjects.lua
Addednew file mode 100644 2 + 'nvim-treesitter/nvim-treesitter-textobjects',
5 + dependencies =
'nvim-treesitter/nvim-treesitter',
7 + require 'nvim-treesitter.configs'.setup {
11 + disable = should_disable,
14 + [
'af'] = {
query =
'@call.outer',
desc =
'outer function call' },
15 + [
'if'] = {
query =
'@call.inner',
desc =
'inner function call' },
17 + [
'am'] = {
query =
'@function.outer',
desc =
'outer function definition' },
18 + [
'im'] = {
query =
'@function.inner',
desc =
'inner function definition' },
20 + [
'ai'] = {
query =
'@conditional.outer',
desc =
'outer conditional' },
21 + [
'ii'] = {
query =
'@conditional.inner',
desc =
'inner conditional' },
23 + [
'aa'] = {
query =
'@parameter.outer',
desc =
'outer parameter' },
24 + [
'ia'] = {
query =
'@parameter.inner',
desc =
'inner parameter' },
26 + [
'ac'] = {
query =
'@comment.outer',
desc =
'outer comment' },
27 + [
'ic'] = {
query =
'@comment.inner',
desc =
'inner comment' },
30 + [
'@parameter.outer'] =
'v',
31 + [
'@function.outer'] =
'v',
32 + [
'@class.outer'] =
'<c-v>',
35 + include_surroundig_whitespace =
true,
40 + disable = should_disable,
43 + [
']m'] = {
query =
'@function.outer',
desc =
'goto next function definition' },
46 + [
'[m'] = {
query =
'@function.outer',
desc =
'goto previous function definition' },
nushell/scripts/notes.nu
Addednew file mode 100644 8 +def validate_context [
11 + if not (
$env.NOTES | path exists) {
13 + msg: "No notes folder found
in environment variables.
14 + Make sure a NOTES variable exists
in $env."
17 + if not (
$env.NOTES | path join
$context | path exists) {
19 + msg: $"The given context (
$context) does not exist
in (
$env.NOTES).
20 + Create it and try again."
26 + --context: string =
"bugabinga" 30 + validate_context
$context 32 + ls --short-names (
$env.NOTES | path join
$context)
36 +def new_note_id [] { random binary
3 | encode new-base64 --nopad --url }
51 +(
$tags |
each {
'- ' +
$in } | str join (char nl))
59 + --tags: list<string>
60 + --context: string =
"bugabinga" 62 + validate_context
$context 64 + let title =
if (
$title | is-empty) { input
"gimme title: " }
else {
$title }
65 + let author =
'Oliver Jan Krylow' 66 + let now = date now | date to-record
67 + let date = $
"($now.day)/($now.month)/($now.year)" 68 + let tags =
if (
$tags == null) { [] }
else {
$tags }
70 + let note_content = new_note
$title $author $date $tags $context 71 + let note_file_name = $
"(new_note_id)-($title | str kebab-case).md" 72 + let note_file = [
$env.NOTES $context $note_file_name] | path join
74 + if (
$note_file | path exists) {
76 + msg:
"the note you are trying to create exists already" 80 + $note_content | save --raw
$note_file 82 + let editor =
if (
$env.EDITOR == null ) {
'vi' }
else {
$env.EDITOR }
83 + let editor =
if (
$env.VISUAL == null ) {
$editor }
else {
$env.VISUAL }
84 + run-external
$editor $note_file