This commit is contained in:
Morten Olsen
2023-03-15 18:16:11 +01:00
commit 4bd2977f90
8 changed files with 112 additions and 0 deletions

3
plugins/core.lua Normal file
View File

@@ -0,0 +1,3 @@
vim.o.wrap = true
return {
}

5
plugins/languages.lua Normal file
View File

@@ -0,0 +1,5 @@
return {
"AstroNvim/astrocommunity",
{ import = "astrocommunity.pack.typescript" },
{ import = "astrocommunity.pack.markdown" },
}

23
plugins/misc.lua Normal file
View File

@@ -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 = "<C-l>",
accept_word = false,
accept_line = false,
next = "<C-.>",
prev = "<C-,>",
dismiss = "<C/>",
},
},
},
},
--{ import = "astrocommunity.indent/indent-blankline-nvim" },
{ import = "astrocommunity.code-runner.overseer-nvim" },
{ import = "astrocommunity.motion.portal-nvim" },
{ import = "astrocommunity.file-explorer.oil-nvim" },
}

37
plugins/tests.lua Normal file
View File

@@ -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 = {
{ "<leader>tw", "<cmd>lua require('neotest').run.run({ })<cr>", desc = "Run tests" },
},
}

11
plugins/theme.lua Normal file
View File

@@ -0,0 +1,11 @@
return {
"AstroNvim/astrocommunity",
{ import = "astrocommunity.colorscheme.nightfox", enabled = true },
{
import = "astrocommunity.colorscheme.kanagawa",
},
{
import = "astrocommunity.colorscheme.oxocarbon",
enabled = true,
},
}

11
plugins/ui.lua Normal file
View File

@@ -0,0 +1,11 @@
return {
"AstroNvim/astrocommunity",
{ import = "astrocommunity.editing-support/zen-mode-nvim" },
{
"m4xshen/smartcolumn.nvim",
opts = {
colorcolumn = 120,
disabled_filetypes = { "help" },
},
},
}

18
plugins/undo-tree.lua Normal file
View File

@@ -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 = {
{ "<leader>U", ":UndotreeToggle<cr>", desc = "Toggle undotree"}
}
}