diff --git a/lazyvim.json b/lazyvim.json index dcd8f9f..cecd141 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -3,6 +3,7 @@ "lazyvim.plugins.extras.coding.mini-surround", "lazyvim.plugins.extras.editor.mini-files", "lazyvim.plugins.extras.editor.snacks_picker", + "lazyvim.plugins.extras.formatting.prettier", "lazyvim.plugins.extras.lang.markdown", "lazyvim.plugins.extras.lang.rust" ], diff --git a/lua/config/options.lua b/lua/config/options.lua index 474ac99..d8eb573 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -10,3 +10,5 @@ vim.cmd([[ let &shellpipe = '2>&1 | %%{ "$_" } | Tee-Object %s; exit $LastExitCode' set shellquote= shellxquote= ]]) + +vim.opt.shellslash = true diff --git a/lua/plugins/lazyvim.lua b/lua/plugins/lazyvim.lua new file mode 100644 index 0000000..6cedbc4 --- /dev/null +++ b/lua/plugins/lazyvim.lua @@ -0,0 +1,2 @@ +-- Pin LazyVim to version 14 until neorg fixes their tree-sitter parser +return { "LazyVim", version = "14" } diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua new file mode 100644 index 0000000..9d7be79 --- /dev/null +++ b/lua/plugins/neorg.lua @@ -0,0 +1,26 @@ +return { + "nvim-neorg/neorg", + enabled = true, + lazy = false, + version = "*", + config = function() + --vim.g.maplocalleader = " " + require("neorg").setup({ + load = { + ["core.defaults"] = {}, + ["core.concealer"] = {}, + ["core.dirman"] = { + config = { + workspaces = { + notes = "C:\\Users\\EmmaTurner\\OneDrive - Exponential Technology Group, Inc\\Documents\\Notes", + }, + default_workspace = "notes", + }, + }, + }, + }) + + vim.wo.foldlevel = 99 + vim.wo.conceallevel = 2 + end, +} diff --git a/lua/plugins/orgmode.lua b/lua/plugins/orgmode.lua new file mode 100644 index 0000000..7446bba --- /dev/null +++ b/lua/plugins/orgmode.lua @@ -0,0 +1,70 @@ +return { + "nvim-orgmode/orgmode", + -- enabled = false, + -- workaround since recent commit caused errors + commit = "03863e9a4a617deab3d58023d54dc8e38730cf6d", + dependencies = { + "nvim-orgmode/org-bullets.nvim", + "saghen/blink.cmp", + }, + event = "VeryLazy", + config = function() + -- Setup orgmode + require("orgmode").setup({ + mappings = { + org = { + org_toggle_checkbox = "", + }, + }, + org_agenda_files = "C:/Users/EmmaTurner/OneDrive - Exponential Technology Group, Inc/Documents/Notes/**/*", + org_agenda_custom_commands = { + r = { + description = "Revisit", + types = { + { + type = "tags", + match = "revisit", + org_agenda_overiding_header = "Tasks to revisit", + }, + }, + }, + }, + org_default_notes_file = "C:/Users/EmmaTurner/OneDrive - Exponential Technology Group, Inc/Documents/Notes/refile.org", + -- org_todo_keywords = { "TODO", "WAITING", "|", "DONE" }, + -- Use fast access TODO States, instead of cycling use set character (or first letter) to select TODO state + org_todo_keywords = { "TODO(t)", "WAITING", "|", "DONE" }, + org_hide_emphasis_markers = true, -- Conceal bold/italic/underline/code/verbatim markers + calendar_week_start_day = 0, -- Start week on Sunday(0) instead of Monday(1) + ui = { + input = { + use_vim_ui = true, + }, + }, + }) + + vim.api.nvim_create_autocmd("FileType", { + pattern = "org", + callback = function() + vim.keymap.set("i", "", function() + require("orgmode").action("org_mappings.meta_return") + end) + end, + }) + + require("org-bullets").setup() + require("blink.cmp").setup({ + sources = { + per_filetype = { + org = { "orgmode" }, + }, + providers = { + orgmode = { + name = "Orgmode", + module = "orgmode.org.autocompletion.blink", + fallbacks = { "buffer" }, + }, + }, + }, + }) + end, +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua new file mode 100644 index 0000000..8ad76d1 --- /dev/null +++ b/lua/plugins/treesitter.lua @@ -0,0 +1,38 @@ +return { + -- { + -- "nvim-treesitter/nvim-treesitter", + -- opts = { + -- ensure_installed = { + -- "bash", + -- "html", + -- "javascript", + -- "json", + -- "lua", + -- "markdown", + -- "markdown_inline", + -- "python", + -- "query", + -- "regex", + -- "tsx", + -- "typescript", + -- "vim", + -- "yaml", + -- }, + -- }, + -- }, + + -- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above + -- would overwrite `ensure_installed` with the new value. + -- If you'd rather extend the default config, use the code below instead: + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + vim.list_extend(opts.ensure_installed, { + "c_sharp", + "css", + "sql", + "xml", + }) + end, + }, +} diff --git a/snippets/org.json b/snippets/org.json new file mode 100644 index 0000000..539c9b0 --- /dev/null +++ b/snippets/org.json @@ -0,0 +1,6 @@ +{ + "Org Properties": { + "prefix": "drawer", + "body": [":PROPERTIES:", ":${1:CATEGORY}: $2", ":END:"] + } +}