commit 4bd2977f90da4c40de47277e494e388ac794dd9f Author: Morten Olsen Date: Wed Mar 15 18:16:11 2023 +0100 init diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..6b9f3db --- /dev/null +++ b/init.lua @@ -0,0 +1,4 @@ +return { + colorscheme = "kanagawa", +} + diff --git a/plugins/core.lua b/plugins/core.lua new file mode 100644 index 0000000..319231b --- /dev/null +++ b/plugins/core.lua @@ -0,0 +1,3 @@ +vim.o.wrap = true +return { +} diff --git a/plugins/languages.lua b/plugins/languages.lua new file mode 100644 index 0000000..ec6dfed --- /dev/null +++ b/plugins/languages.lua @@ -0,0 +1,5 @@ +return { + "AstroNvim/astrocommunity", + { import = "astrocommunity.pack.typescript" }, + { import = "astrocommunity.pack.markdown" }, +} diff --git a/plugins/misc.lua b/plugins/misc.lua new file mode 100644 index 0000000..5749657 --- /dev/null +++ b/plugins/misc.lua @@ -0,0 +1,23 @@ +return { + "AstroNvim/astrocommunity", + { import = "astrocommunity.completion.copilot-lua" }, + { -- further customize the options set by the community + "zbirenbaum/copilot.lua", + opts = { + suggestion = { + keymap = { + accept = "", + accept_word = false, + accept_line = false, + next = "", + prev = "", + dismiss = "", + }, + }, + }, + }, + --{ import = "astrocommunity.indent/indent-blankline-nvim" }, + { import = "astrocommunity.code-runner.overseer-nvim" }, + { import = "astrocommunity.motion.portal-nvim" }, + { import = "astrocommunity.file-explorer.oil-nvim" }, +} diff --git a/plugins/tests.lua b/plugins/tests.lua new file mode 100644 index 0000000..a7bad8a --- /dev/null +++ b/plugins/tests.lua @@ -0,0 +1,37 @@ +return { + "nvim-neotest/neotest", + config = function() + -- get neotest namespace (api call creates or returns namespace) + local neotest_ns = vim.api.nvim_create_namespace "neotest" + vim.diagnostic.config({ + virtual_text = { + format = function(diagnostic) + local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "") + return message + end, + }, + }, neotest_ns) + require("neotest").setup { + -- your neotest config here + adapters = { + require "neotest-go", + require "neotest-rust", + require "neotest-python", + require "neotest-vitest", + require "neotest-jest", + }, + } + end, + ft = { "go", "rust", "python", "typescript" }, + dependencies = { + "nvim-neotest/neotest-go", + "nvim-neotest/neotest-python", + "rouge8/neotest-rust", + "marilari88/neotest-vitest", + "haydenmeade/neotest-jest", + }, + keys = { + { "tw", "lua require('neotest').run.run({ })", desc = "Run tests" }, + }, +} + diff --git a/plugins/theme.lua b/plugins/theme.lua new file mode 100644 index 0000000..87616a1 --- /dev/null +++ b/plugins/theme.lua @@ -0,0 +1,11 @@ +return { + "AstroNvim/astrocommunity", + { import = "astrocommunity.colorscheme.nightfox", enabled = true }, + { + import = "astrocommunity.colorscheme.kanagawa", + }, + { + import = "astrocommunity.colorscheme.oxocarbon", + enabled = true, + }, +} diff --git a/plugins/ui.lua b/plugins/ui.lua new file mode 100644 index 0000000..92266ab --- /dev/null +++ b/plugins/ui.lua @@ -0,0 +1,11 @@ +return { + "AstroNvim/astrocommunity", + { import = "astrocommunity.editing-support/zen-mode-nvim" }, + { + "m4xshen/smartcolumn.nvim", + opts = { + colorcolumn = 120, + disabled_filetypes = { "help" }, + }, + }, +} diff --git a/plugins/undo-tree.lua b/plugins/undo-tree.lua new file mode 100644 index 0000000..fc9efd0 --- /dev/null +++ b/plugins/undo-tree.lua @@ -0,0 +1,18 @@ +local opt = vim.o +local run = vim.cmd + +return { + "mbbill/undotree", + event = "BufRead", + config = function() + opt.backup = true -- enable backup + opt.backupdir = os.getenv("HOME") .. "/.vim/backup" -- save backups to this directory + opt.swapfile = false -- no swap file, no + + -- save undo history + opt.undodir = os.getenv("HOME") .. "/.vim/undo" + end, + keys = { + { "U", ":UndotreeToggle", desc = "Toggle undotree"} + } +}