diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 2c134f7..9957a1f 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -1,3 +1,7 @@ -- Keymaps are automatically loaded on the VeryLazy event -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua -- Add any additional keymaps here + +-- Buffers +vim.keymap.set("n", "bF", ":bf", { noremap = true, silent = true, desc = "[F]irst buffer" }) +vim.keymap.set("n", "bL", ":bl", { noremap = true, silent = true, desc = "[L]ast buffer" }) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index d73bfa1..edd7189 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -19,6 +19,18 @@ require("lazy").setup({ -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, -- import/override with your plugins + { import = "lazyvim.plugins.extras.lang.typescript" }, + { import = "lazyvim.plugins.extras.lang.tailwind" }, + { import = "lazyvim.plugins.extras.lang.json" }, + { import = "lazyvim.plugins.extras.lang.python" }, + -- { import = "lazyvim.plugins.extras.lang.go" }, + -- { import = "lazyvim.plugins.extras.lang.markdown" }, + { import = "lazyvim.plugins.extras.coding.mini-surround" }, + { import = "lazyvim.plugins.extras.editor.harpoon2" }, + { import = "lazyvim.plugins.extras.editor.refactoring" }, + -- { import = "lazyvim.plugins.extras.util.project" }, + -- { import = "lazyvim.plugins.extras.dap.core" }, + -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, { import = "plugins" }, }, defaults = { diff --git a/lua/config/options.lua b/lua/config/options.lua index 3ea1454..12d9d61 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -1,3 +1,6 @@ -- Options are automatically loaded before lazy.nvim startup -- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua -- Add any additional options here + +-- LazyVim auto format +vim.g.autoformat = false diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua new file mode 100755 index 0000000..7a24539 --- /dev/null +++ b/lua/plugins/gitsigns.lua @@ -0,0 +1,15 @@ +return { + "lewis6991/gitsigns.nvim", + opts = { + on_attach = function(buffer) + local gs = package.loaded.gitsigns + + local function map(mode, l, r, desc) + vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc }) + end + + -- New mapping for toggling current line blame + map("n", "gt", gs.toggle_current_line_blame, "[T]oggle Git blame") + end, + }, +} diff --git a/lua/plugins/obsidian.lua b/lua/plugins/obsidian.lua new file mode 100755 index 0000000..b6e76ad --- /dev/null +++ b/lua/plugins/obsidian.lua @@ -0,0 +1,137 @@ +return { + -- add Obsidian + { + -- https://github.com/epwalsh/obsidian.nvim + "epwalsh/obsidian.nvim", + version = "*", -- recommended, use latest release instead of latest commit + lazy = true, + event = "VimEnter", + -- ft = "markdown", + -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: + -- event = { + -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. + -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md" + -- "BufReadPre path/to/my-vault/**.md", + -- "BufNewFile path/to/my-vault/**.md", + -- }, + dependencies = { + -- Required. + "nvim-lua/plenary.nvim", + + -- see below for full list of optional dependencies 👇 + }, + opts = { + workspaces = { + { + name = "personal", + path = "~/01_Projects/71_obsidianvault", + }, + -- { + -- name = "work", + -- path = "~/vaults/work", + -- }, + }, + + -- see below for full list of options 👇 + -- Optional, if you keep notes in a specific subdirectory of your vault. + notes_subdir = "02_Inbox", + + daily_notes = { + -- Optional, if you keep daily notes in a separate directory. + folder = "03_Journal", + -- Optional, if you want to change the date format for the ID of daily notes. + date_format = "%Y-%m-%d", + -- Optional, if you want to change the date format of the default alias of daily notes. + alias_format = "%B %-d, %Y", + -- Optional, default tags to add to each new daily note created. + default_tags = { "daily-notes" }, + -- Optional, if you want to automatically insert a template from your template directory like 'daily.md' + template = nil, + }, + + -- Optional, for templates (see below). + templates = { + folder = "00_Templates", + date_format = "%Y-%m-%d", + time_format = "%H:%M", + -- A map for custom variables, the key should be the variable and the value a function + substitutions = {}, + }, + + -- Optional, configure additional syntax highlighting / extmarks. + -- This requires you have `conceallevel` set to 1 or 2. See `:help conceallevel` for more details. + ui = { + enable = true, -- set to false to disable all additional syntax features + update_debounce = 200, -- update delay after a text change (in milliseconds) + max_file_length = 5000, -- disable UI features for files with more than this many lines + -- Define how various check-boxes are displayed + checkboxes = { + -- NOTE: the 'char' value has to be a single character, and the highlight groups are defined below. + [" "] = { char = "󰄱", hl_group = "ObsidianTodo" }, + ["x"] = { char = "", hl_group = "ObsidianDone" }, + -- ["~"] = { char = "󰰱", hl_group = "ObsidianTilde" }, + ["-"] = { char = "󰰱", hl_group = "ObsidianTilde" }, + ["!"] = { char = "", hl_group = "ObsidianImportant" }, + ["<"] = { char = "≡", hl_group = "ObsidianSchedule" }, + ["/"] = { char = "○", hl_group = "ObsidianPartial" }, + -- ["/"] = { char = "◧", hl_group = "ObsidianPartial" }, + [">"] = { char = "", hl_group = "ObsidianRightArrow" }, + -- Replace the above with this if you don't have a patched font: + -- [" "] = { char = "☐", hl_group = "ObsidianTodo" }, + -- ["x"] = { char = "✔", hl_group = "ObsidianDone" }, + + -- You can also add more custom ones... + }, + -- -- Use bullet marks for non-checkbox lists. + -- bullets = { char = "•", hl_group = "ObsidianBullet" }, + -- external_link_icon = { char = "", hl_group = "ObsidianExtLinkIcon" }, + -- -- Replace the above with this if you don't have a patched font: + -- -- external_link_icon = { char = "", hl_group = "ObsidianExtLinkIcon" }, + -- reference_text = { hl_group = "ObsidianRefText" }, + -- highlight_text = { hl_group = "ObsidianHighlightText" }, + -- tags = { hl_group = "ObsidianTag" }, + -- block_ids = { hl_group = "ObsidianBlockID" }, + hl_groups = { + -- The options are passed directly to `vim.api.nvim_set_hl()`. See `:help nvim_set_hl`. + ObsidianTodo = { bold = true, fg = "#f78c6c" }, + ObsidianDone = { bold = true, fg = "#89ddff" }, + ObsidianRightArrow = { bold = true, fg = "#f78c6c" }, + ObsidianTilde = { bold = true, fg = "#ff5370" }, + ObsidianImportant = { bold = true, fg = "#d73128" }, + ObsidianBullet = { bold = true, fg = "#89ddff" }, + ObsidianRefText = { underline = true, fg = "#c792ea" }, + ObsidianExtLinkIcon = { fg = "#c792ea" }, + ObsidianTag = { italic = true, fg = "#89ddff" }, + ObsidianBlockID = { italic = true, fg = "#89ddff" }, + ObsidianHighlightText = { bg = "#75662e" }, + }, + }, + + -- Specify how to handle attachments. + attachments = { + -- The default folder to place images in via `:ObsidianPasteImg`. + -- If this is a relative path it will be interpreted as relative to the vault root. + -- You can always override this per image by passing a full path to the command instead of just a filename. + img_folder = "98_Files/imgs", -- This is the default + + -- -- Optional, customize the default name or prefix when pasting images via `:ObsidianPasteImg`. + -- ---@return string + -- img_name_func = function() + -- -- Prefix image names with timestamp. + -- return string.format("%s-", os.time()) + -- end, + -- + -- -- A function that determines the text to insert in the note when pasting an image. + -- -- It takes two arguments, the `obsidian.Client` and an `obsidian.Path` to the image file. + -- -- This is the default implementation. + -- ---@param client obsidian.Client + -- ---@param path obsidian.Path the absolute path to the image file + -- ---@return string + -- img_text_func = function(client, path) + -- path = client:vault_relative_path(path) or path + -- return string.format("![%s](%s)", path.name, path) + -- end, + }, + }, + }, +} diff --git a/lua/plugins/tmuxnav.lua b/lua/plugins/tmuxnav.lua new file mode 100755 index 0000000..abbb0a7 --- /dev/null +++ b/lua/plugins/tmuxnav.lua @@ -0,0 +1,20 @@ +return { + -- add vim-tmux-navigator + { + "christoomey/vim-tmux-navigator", + cmd = { + "TmuxNavigateLeft", + "TmuxNavigateDown", + "TmuxNavigateUp", + "TmuxNavigateRight", + "TmuxNavigatePrevious", + }, + keys = { + { "", "TmuxNavigateLeft" }, + { "", "TmuxNavigateDown" }, + { "", "TmuxNavigateUp" }, + { "", "TmuxNavigateRight" }, + { "", "TmuxNavigatePrevious" }, + }, + }, +}