diff --git a/.nvchad-custom/configs/lspconfig.lua b/.nvchad-custom/configs/lspconfig.lua index c770a53..e85c263 100644 --- a/.nvchad-custom/configs/lspconfig.lua +++ b/.nvchad-custom/configs/lspconfig.lua @@ -14,6 +14,7 @@ local servers = { "rust_analyzer", "pyright", "grammarly", + "marksman", } for _, lsp in ipairs(servers) do @@ -29,5 +30,3 @@ lspconfig["clangd"].setup({ offsetEncoding = { "utf-16" }, }, }) --- --- lspconfig.pyright.setup { blabla} diff --git a/.nvchad-custom/configs/overrides.lua b/.nvchad-custom/configs/overrides.lua index e17a6cc..5c648b1 100644 --- a/.nvchad-custom/configs/overrides.lua +++ b/.nvchad-custom/configs/overrides.lua @@ -2,17 +2,28 @@ local M = {} M.treesitter = { ensure_installed = { - "vim", - "lua", - "html", - "css", - "javascript", "typescript", "python", "tsx", "c", + "javascript", + "json", + "lua", + "luadoc", + "luap", "markdown", "markdown_inline", + "query", + "regex", + "vim", + "vimdoc", + "bash", + "html", + "css", + "javascript", + "yaml", + "julia", + "r", }, indent = { enable = true, @@ -41,7 +52,6 @@ M.mason = { "jedi_language_server", - "docker_compose_language_service", "dockerls", }, @@ -63,8 +73,8 @@ M.nvimtree = { }, } -M.cmp = function (_, opts) - local cmp = require "cmp" +M.cmp = function(_, opts) + local cmp = require("cmp") opts.experimental = { ghost_text = true, } @@ -73,20 +83,20 @@ M.cmp = function (_, opts) { name = "luasnip" }, { name = "nvim_lua" }, { name = "path" }, - { name = "buffer", keyword_length = 5}, + { name = "buffer", keyword_length = 5 }, }) - opts.mapping = cmp.config.mapping { + opts.mapping = cmp.config.mapping({ [""] = cmp.mapping.select_prev_item(), [""] = cmp.mapping.select_next_item(), [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), [""] = cmp.mapping.close(), - [""] = cmp.mapping.confirm { + [""] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true, - }, + }), [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() @@ -111,10 +121,8 @@ M.cmp = function (_, opts) "i", "s", }), - } + }) return opts end - return M - diff --git a/.nvchad-custom/plugins.lua b/.nvchad-custom/plugins.lua index c766803..38bc924 100644 --- a/.nvchad-custom/plugins.lua +++ b/.nvchad-custom/plugins.lua @@ -47,6 +47,22 @@ local plugins = { require("plugins.configs.lspconfig") require("custom.configs.lspconfig") end, -- Override to setup mason-lspconfig + opts = { + ---@type lspconfig.options + servers = { + pyright = {}, + r_language_server = {}, + julials = {}, + marksman = { + -- also needs: + -- $home/.config/marksman/config.toml : + -- [core] + -- markdown.file_extensions = ["md", "markdown", "qmd"] + filetypes = { "markdown", "quarto" }, + root_dir = require("lspconfig.util").root_pattern(".git", ".marksman.toml", "_quarto.yml"), + }, + }, + }, }, -- override plugin configs { @@ -113,25 +129,26 @@ local plugins = { lazy = false, }, - { - "epwalsh/obsidian.nvim", - version = "*", -- recommended, use latest release instead of latest commit - lazy = true, - ft = "markdown", - -- ft = { - -- "BufReadPre ~/Notes/**.md", - -- "BufNewFile ~/Notes/**.md", - -- }, - dependencies = { "nvim-lua/plenary.nvim" }, - opts = { - workspaces = { - { name = "second-brain", path = "~/second-brain" }, - }, - new_notes_location = "notes_subdir", - daily_notes = { folder = "notes/dailies" }, - }, - }, - -- Disable nvchad plugins + { + "epwalsh/obsidian.nvim", + version = "*", -- recommended, use latest release instead of latest commit + lazy = true, + ft = "markdown", + -- ft = { + -- "BufReadPre ~/Notes/**.md", + -- "BufNewFile ~/Notes/**.md", + -- }, + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { + workspaces = { + { name = "second-brain", path = "~/second-brain" }, + }, + new_notes_location = "notes_subdir", + daily_notes = { folder = "notes/dailies" }, + }, + }, + + -- Disable nvchad plugins { "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" }, @@ -142,7 +159,43 @@ local plugins = { -- refer to the configuration section below }, }, + { + "quarto-dev/quarto-nvim", + opts = { + lspFeatures = { + languages = { "r", "python", "julia", "bash", "html", "lua" }, + }, + }, + ft = "quarto", + keys = { + { "qa", ":QuartoActivate", desc = "quarto activate" }, + { "qp", ":lua require'quarto'.quartoPreview()", desc = "quarto preview" }, + { "qq", ":lua require'quarto'.quartoClosePreview()", desc = "quarto close" }, + { "qh", ":QuartoHelp ", desc = "quarto help" }, + { "qe", ":lua require'otter'.export()", desc = "quarto export" }, + { "qE", ":lua require'otter'.export(true)", desc = "quarto export overwrite" }, + { "qrr", ":QuartoSendAbove", desc = "quarto run to cursor" }, + { "qra", ":QuartoSendAll", desc = "quarto run all" }, + { "", ":SlimeSend", desc = "send code chunk" }, + { "", ":SlimeSend", desc = "send code chunk" }, + { "", ":SlimeSendi", mode = "i", desc = "send code chunk" }, + { "", "SlimeRegionSend", mode = "v", desc = "send code chunk" }, + { "", "SlimeRegionSend", mode = "v", desc = "send code chunk" }, + { "ctr", ":split term://R", desc = "terminal: R" }, + { "cti", ":split term://ipython", desc = "terminal: ipython" }, + { "ctp", ":split term://python", desc = "terminal: python" }, + { "ctj", ":split term://julia", desc = "terminal: julia" }, + }, + }, + { + "jmbuhr/otter.nvim", + opts = { + buffers = { + set_filetype = true, + }, + }, + }, -- Disable nvchad plugins {