diff --git a/README.md b/README.md index 307648e..9d3b8b5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +# Dependencies +wl-clipboard ripgrep + ## Used plugins - https://github.com/folke/lazy.nvim (plugin manager) @@ -6,9 +9,10 @@ - https://github.com/nvim-lualine/lualine.nvim (status bar) ### Basic utilitiy plugins -- https://github.com/nvim-telescope/telescope.nvim (fuzzy finder +- https://github.com/nvim-telescope/telescope.nvim (fuzzy finder) - https://github.com/nvim-telescope/telescope-ui-select.nvim (ui for code actions) -) +- https://github.com/epwalsh/obsidian.nvim (Obsidian in Nvim) + - https://github.com/nvim-treesitter/nvim-treesitter (tree sitter plugin old) - https://github.com/nvim-neo-tree/neo-tree.nvim (map of filesystem) - https://github.com/christoomey/vim-tmux-navigator (tmux integration) @@ -33,7 +37,6 @@ ## Cool plugins to add ### Cool plugins to study -- https://github.com/epwalsh/obsidian.nvim (Obsidian in Nvim) - https://github.com/Feel-ix-343/markdown-oxide?tab=readme-ov-file (lsp that makes Obsidian from .md) ## Tutorials foud diff --git a/init.lua b/init.lua index c44c0ed..c74929c 100644 --- a/init.lua +++ b/init.lua @@ -18,14 +18,12 @@ vim.opt.rtp:prepend(lazypath) require("lazy").setup("plugins") -- packet manager -- --- local builtin = require("telescope.builtin") -- fuzzy finder -- - local config = require("nvim-treesitter.configs") -- tree sitter plugin config for langs -- config.setup({ ensure_installed = { "lua", "python", "javascript", "html", "css", - "markdown", + "markdown", "markdown_inline" }, highlight = { enable = true }, indent = { enable = true }, diff --git a/lua/plugins/obsidian.lua b/lua/plugins/obsidian.lua new file mode 100644 index 0000000..a0dc8c3 --- /dev/null +++ b/lua/plugins/obsidian.lua @@ -0,0 +1,66 @@ +return { + "epwalsh/obsidian.nvim", + version = "*", -- recommended, use latest release instead of latest commit + lazy = true, + 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" + -- refer to `:h file-pattern` for more examples + -- "BufReadPre ~/Nextcloud/Notes/*.md", + -- "BufNewFile path/to/my-vault/*.md", + }, + dependencies = { + -- Required. + "nvim-lua/plenary.nvim", + -- see below for full list of optional dependencies 👇 + "hrsh7th/nvim-cmp", + }, + opts = { + workspaces = { + --{ + -- name = "Notes", + -- path = "~/Nextcloud/Notes", + --}, + { + name = "Skola", + path = "/home/godot/Nextcloud/Notes/Skola", + }, + { + name = "RPG", + path = "/home/godot/Nextcloud/Notes/RPG", + }, + { + name = "Tech", + path = "/home/godot/Nextcloud/Notes/Tech", + }, + }, + + mappings = { + -- Overrides the 'gf' mapping to work on markdown/wiki links within your vault. + ["gf"] = { + action = function() + return require("obsidian").util.gf_passthrough() + end, + opts = { noremap = false, expr = true, buffer = true }, + }, + -- Toggle check-boxes. + ["ch"] = { + action = function() + return require("obsidian").util.toggle_checkbox() + end, + opts = { buffer = true }, + }, + -- Smart action depending on context, either follow link or toggle checkbox. + [""] = { + action = function() + return require("obsidian").util.smart_action() + end, + opts = { buffer = true, expr = true }, + } + }, + + -- see below for full list of options 👇 + }, +}