Compare commits

...

2 commits

Author SHA1 Message Date
974790dce7 feat: open nvim in the notes directory. 2025-12-04 20:33:37 +01:00
02ac3af2e5 chore: update flake.lock 2025-12-04 20:33:13 +01:00
2 changed files with 11 additions and 10 deletions

12
flake.lock generated
View file

@ -28,11 +28,11 @@
]
},
"locked": {
"lastModified": 1759991118,
"narHash": "sha256-pDyrtUQyeP1lVTMIYqJtftzDtsXEZaJjYy9ZQ/SGhL8=",
"lastModified": 1763982521,
"narHash": "sha256-ur4QIAHwgFc0vXiaxn5No/FuZicxBr2p0gmT54xZkUQ=",
"owner": "nix-community",
"repo": "gomod2nix",
"rev": "7f8d7438f5870eb167abaf2c39eea3d2302019d1",
"rev": "02e63a239d6eabd595db56852535992c898eba72",
"type": "github"
},
"original": {
@ -43,11 +43,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1760524057,
"narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=",
"lastModified": 1764667669,
"narHash": "sha256-7WUCZfmqLAssbDqwg9cUDAXrSoXN79eEEq17qhTNM/Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5",
"rev": "418468ac9527e799809c900eda37cbff999199b6",
"type": "github"
},
"original": {

View file

@ -32,7 +32,7 @@ func ParseFlags(sb string) {
if *quickPtr {
file := note + "/quick.md"
OpenNvim(file)
OpenNvim(file, sb)
os.Exit(0)
}
@ -67,7 +67,7 @@ func ParseFlags(sb string) {
os.WriteFile(file, t, 0644)
}
OpenNvim(file)
OpenNvim(file, sb)
os.Exit(0)
}
@ -77,11 +77,12 @@ func ParseFlags(sb string) {
}
file := note + "/" + fileName[0] + ".md"
OpenNvim(file)
OpenNvim(file, sb)
}
func OpenNvim(file string) {
func OpenNvim(file string, dir string) {
nvim := exec.Command("nvim", file)
nvim.Dir = dir
nvim.Stdin = os.Stdin
nvim.Stdout = os.Stdout
nvim.Stderr = os.Stderr