diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index ffe4aed..7f42eaa 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -16,6 +16,9 @@ vim.api.nvim_set_keymap("n", "", "(coc-snippets-expand)", { noremap = vim.keymap.set("i", "", vim.fn["codeium#Accept"], { expr = true }) vim.keymap.set("i", "", vim.fn["codeium#Complete"], { expr = true }) +vim.keymap.set("i", "jh", ":w", { noremap = true, silent = true }) +-- vim.keymap.set("n", "jh", ":w", { noremap = true, silent = true }) + vim.keymap.set("n", "", function() require("harpoon.ui").nav_prev() end, { silent = true, noremap = true }) diff --git a/lua/config/options.lua b/lua/config/options.lua index 233fef1..b0640b3 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -45,5 +45,7 @@ vim.o.timeout = true vim.o.timeoutlen = 300 vim.opt.syntax = "off" +vim.opt.spell = false vim.opt.termguicolors = true +vim.opt.conceallevel = 2 diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 234dda5..328606c 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -1,7 +1,6 @@ return { { "Mofiqul/vscode.nvim", config = {} }, { "catppuccin/nvim", name = "catppuccin" }, - { "jul-o/LazyVim", opts = { diff --git a/lua/plugins/hologram-math-preview.lua b/lua/plugins/hologram-math-preview.lua new file mode 100644 index 0000000..6483ee0 --- /dev/null +++ b/lua/plugins/hologram-math-preview.lua @@ -0,0 +1 @@ +return { "Vaisakhkm2625/hologram-math-preview.nvim" } diff --git a/lua/plugins/hologram.lua b/lua/plugins/hologram.lua new file mode 100644 index 0000000..728dc96 --- /dev/null +++ b/lua/plugins/hologram.lua @@ -0,0 +1 @@ +return { "edluffy/hologram.nvim" } diff --git a/lua/plugins/image.lua b/lua/plugins/image.lua new file mode 100644 index 0000000..cbb4400 --- /dev/null +++ b/lua/plugins/image.lua @@ -0,0 +1,38 @@ +-- package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?/init.lua;" +-- package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?.lua;" + +return { + "3rd/image.nvim", + event = "VeryLazy", + enabled = false, + opts = { + { + backend = "kitty", + integrations = { + markdown = { + enabled = true, + clear_in_insert_mode = false, + download_remote_images = true, + only_render_image_at_cursor = true, + filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here + }, + neorg = { + enabled = true, + clear_in_insert_mode = false, + download_remote_images = true, + only_render_image_at_cursor = true, + filetypes = { "norg" }, + }, + }, + max_width = nil, + max_height = nil, + max_width_window_percentage = nil, + max_height_window_percentage = 50, + window_overlap_clear_enabled = true, -- toggles images when windows are overlapped + window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" }, + editor_only_render_when_focused = true, -- auto show/hide images when the editor gains/looses focus + tmux_show_only_in_active_window = true, -- auto show/hide images in the correct Tmux window (needs visual-activity off) + hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp" }, -- render image files as images when opened + }, + }, +} diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index d9569e4..37272cf 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -1,7 +1,78 @@ -return { +-- local M = { +-- "nvim-neorg/neorg", +-- ft = "norg", +-- dependencies = { +-- "luarocks.nvim", -- this is it. +-- -- "nvim-treesitter/nvim-treesitter", +-- -- "nvim-treesitter/nvim-treesitter-textobjects", +-- -- "nvim-cmp", +-- -- "nvim-lua/plenary.nvim", +-- }, +-- -- build = ":Neorg sync-parsers", -- and delete this line. +-- cmd = "Neorg", +-- } +-- local modules = { +-- ["core.defaults"] = {}, +-- ["core.completion"] = { config = { engine = "nvim-cmp", name = "[Norg]" } }, +-- ["core.integrations.nvim-cmp"] = {}, +-- ["core.concealer"] = { config = { icon_preset = "diamond" } }, +-- ["core.keybinds"] = { +-- -- https://github.com/nvim-neorg/neorg/blob/main/lua/neorg/modules/core/keybinds/keybinds.lua +-- config = { +-- default_keybinds = true, +-- neorg_leader = "", +-- }, +-- }, +-- ["core.dirman"] = { +-- config = { +-- workspaces = { +-- ["DE-parapente"] = "~/Documents/parapente/DE/cours", +-- ["Neorg-tuto"] = "~/Documents/Norg-Tutorial", +-- }, +-- }, +-- }, +-- } +-- M.opts = { +-- load = modules, +-- } +-- return M + +local M = { "nvim-neorg/neorg", - dependencies = { "luarocks.nvim" }, - lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default - version = "*", -- Pin Neorg to the latest stable release - config = true, + ft = "norg", + dependencies = { + "nvim-treesitter/nvim-treesitter", + "nvim-treesitter/nvim-treesitter-textobjects", + "nvim-cmp", + "nvim-lua/plenary.nvim", + }, + build = ":Neorg sync-parsers", + cmd = "Neorg", } +local modules = { + ["core.defaults"] = {}, + ["core.completion"] = { config = { engine = "nvim-cmp", name = "[Norg]" } }, + ["core.integrations.nvim-cmp"] = {}, + ["core.export"] = {}, + ["core.export.markdown"] = { config = { extension = "all" } }, + ["core.concealer"] = { config = { icon_preset = "diamond" } }, + ["core.keybinds"] = { + -- https://github.com/nvim-neorg/neorg/blob/main/lua/neorg/modules/core/keybinds/keybinds.lua + config = { + default_keybinds = true, + neorg_leader = "", + }, + }, + ["core.dirman"] = { + config = { + workspaces = { + ["DE-parapente"] = "~/Documents/parapente/DE/cours", + ["Neorg-tuto"] = "~/Documents/Norg-Tutorial", + }, + }, + }, +} +M.opts = { + load = modules, +} +return M diff --git a/lua/plugins/nvim-treesitter.lua b/lua/plugins/nvim-treesitter.lua index c50c1da..de580e4 100644 --- a/lua/plugins/nvim-treesitter.lua +++ b/lua/plugins/nvim-treesitter.lua @@ -2,7 +2,7 @@ return { "nvim-treesitter/nvim-treesitter", opts = function(_, opts) if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "markdown", "markdown_inline" }) + vim.list_extend(opts.ensure_installed, { "markdown", "markdown_inline", "latex" }) end end, setup = { diff --git a/lua/plugins/obsidian.lua b/lua/plugins/obsidian.lua new file mode 100644 index 0000000..4cd2a95 --- /dev/null +++ b/lua/plugins/obsidian.lua @@ -0,0 +1,25 @@ +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" + -- "BufReadPre path/to/my-vault/**.md", + -- "BufNewFile path/to/my-vault/**.md", + -- }, + dependencies = { + -- Required. + "nvim-lua/plenary.nvim", + }, + opts = { + workspaces = { + { + name = "personal", + path = "~/Documents/parapente/DE/cours", + }, + }, + }, +} diff --git a/lua/plugins/vim-tmux-navigator.lua b/lua/plugins/vim-tmux-navigator.lua new file mode 100644 index 0000000..1c3fe65 --- /dev/null +++ b/lua/plugins/vim-tmux-navigator.lua @@ -0,0 +1,18 @@ +return { + "christoomey/vim-tmux-navigator", + lazy = false, + cmd = { + "TmuxNavigateLeft", + "TmuxNavigateDown", + "TmuxNavigateUp", + "TmuxNavigateRight", + "TmuxNavigatePrevious", + }, + keys = { + { "", "TmuxNavigateLeft" }, + { "", "TmuxNavigateDown" }, + { "", "TmuxNavigateUp" }, + { "", "TmuxNavigateRight" }, + { "", "TmuxNavigatePrevious" }, + }, +}