all repos

init.lua @ 47dd918

my nvim config
2 files changed, 0 insertions(+), 43 deletions(-)
refactor(notes): remove it all
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2024-11-03 23:23:11 +0200
Parent: 7b7f9a0
M lua/core/keymaps.lua

@@ -12,12 +12,6 @@ u.map("n", "Q", "<nop>") -- Q is the worth thing ever

u.map("n", "[b", ":bp<cr>") u.map("n", "]b", ":bn<cr>") u.map("n", "J", "mzJ`z") -u.map("n", "<leader>N", function() - require("scratch.notes").global() -end) -u.map("n", "<leader>n", function() - require("scratch.notes").project() -end) -- quickfix u.map("n", "]q", "<cmd>cnext<cr>")
D

@@ -1,37 +0,0 @@

-local notes = {} - -local config = { - file_extenson = ".md", - data_path = ("%s/ol_notes/"):format(vim.fn.stdpath "data"), - open_cmd = "70vs", -} - ----@return string ----@private -function notes.get_project_path() - return vim.uv.cwd() --[[@as string]] -end - ----@param prj_path string ----@return string ----@private -function notes.get_note_path(prj_path) - if vim.fn.isdirectory(config.data_path) == 0 then - vim.fn.mkdir(config.data_path, "p") - end - - local p = prj_path:gsub("/", "_") - return config.data_path .. "/" .. p .. config.file_extenson -end - -function notes.project() - vim.cmd( - config.open_cmd .. "! " .. notes.get_note_path(notes.get_project_path()) - ) -end - -function notes.global() - vim.cmd(config.open_cmd .. "! " .. config.data_path .. "/notes.md") -end - -return notes