Skip to content

Commit

Permalink
add neotest framework, rework theming based on NV_THEME env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
appelgriebsch committed May 29, 2023
1 parent b09e996 commit 6a1d2f7
Show file tree
Hide file tree
Showing 10 changed files with 195 additions and 109 deletions.
69 changes: 37 additions & 32 deletions lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,78 +1,83 @@
{
"LazyVim": { "branch": "main", "commit": "5b7ae96c5dd6f951e5ad078c1b044fac0b06f29d" },
"LuaSnip": { "branch": "master", "commit": "fcdaa4313305fe20d928551134c1ec2266e7af2a" },
"SchemaStore.nvim": { "branch": "main", "commit": "15f37630d3abfb98607dd8e4625b731a8558b96d" },
"LazyVim": { "branch": "main", "commit": "6b68378c2c5a6d18b1b4c5ca4c71441997921200" },
"LuaSnip": { "branch": "master", "commit": "a83e4b1ba7edc6fecdad09e39753a7d5eee1d01c" },
"SchemaStore.nvim": { "branch": "main", "commit": "2af5eb30096600eb0dc6058814f4f3fd88d7bd33" },
"alpha-nvim": { "branch": "main", "commit": "1838ae926e8d49fe5330d1498ee8289ae2c340bc" },
"bufdelete.nvim": { "branch": "master", "commit": "8933abc09df6c381d47dc271b1ee5d266541448e" },
"bufdelete.nvim": { "branch": "master", "commit": "ccfa2589fa68512770639839ab3850097fbbf4dc" },
"bufferline.nvim": { "branch": "main", "commit": "32d74d5d044f7cc89892d4781a83d55ee4ed552a" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-npm": { "branch": "main", "commit": "e5753b6103ce4cf887233142fa9f31b2d13b42f2" },
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"crates.nvim": { "branch": "main", "commit": "3648f8787656d7572740560331553abdaa8cb982" },
"diffview.nvim": { "branch": "main", "commit": "15861892ce62d8f4ab6e72bc4ff5b829f994430a" },
"dressing.nvim": { "branch": "master", "commit": "2f17eee4d7709dacfad2a28f35e2acfe9a6cb09d" },
"diffview.nvim": { "branch": "main", "commit": "bff58a6ea3e081ca50049700f9848b2f84ea57be" },
"dressing.nvim": { "branch": "master", "commit": "f19cbd56f7f8cad212c58a7285d09c5d9c273896" },
"flit.nvim": { "branch": "main", "commit": "f60e4b3d49bb5a5e97cfffe66f2e671eb422078e" },
"friendly-snippets": { "branch": "main", "commit": "ef6547d2f586e08e071efeebac835e545f3015cc" },
"friendly-snippets": { "branch": "main", "commit": "8875cccf779160303bf2bed7d422717676f214fd" },
"git-blame.nvim": { "branch": "master", "commit": "b8a23393827a0478dbf606f5397c328895bd4f0e" },
"git-conflict.nvim": { "branch": "main", "commit": "3c89812a83ac749b8851a473863958325a1cd57c" },
"github-nvim-theme": { "branch": "main", "commit": "20a949da713b58f28ba6af153a7d1691933ac942" },
"gitsigns.nvim": { "branch": "main", "commit": "c18b7ca0b5b50596722f3a1572eb9b8eb520c0f1" },
"indent-blankline.nvim": { "branch": "master", "commit": "86d1b71c5c26168c3a3a9ff5f69e833889a09c1d" },
"lazy.nvim": { "branch": "main", "commit": "761b8388af5bcb451e30d886163fcd129278e1d1" },
"leap.nvim": { "branch": "main", "commit": "2950d4826fb92ec3b56c59b5d4f2d575a84cb3fa" },
"github-nvim-theme": { "branch": "main", "commit": "f09a14e9e111f7bfa190dbeab1994b8240dbf2ab" },
"gitsigns.nvim": { "branch": "main", "commit": "f868d82a36f7f7f5e110eb0a9659993984f59875" },
"indent-blankline.nvim": { "branch": "master", "commit": "ceaf730b13e332cd76600d9795722413c236c684" },
"lazy.nvim": { "branch": "main", "commit": "ebdd0499551765e6a7aba220cc8ae4e0cdb6be69" },
"leap.nvim": { "branch": "main", "commit": "be918a8e6aa00a6cfa7270d4bfcc11b2f80d6902" },
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "c55d18f3947562e699d34d89681edbf9f0e250d3" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "f0ce33f4794a2364eb08d09d09380e8b04ec5e6a" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "c836e511e796d2b6a25ad9f164f5b25d8b9ff705" },
"mason.nvim": { "branch": "main", "commit": "08b2fd308e0107eab9f0b59d570b69089fd0b522" },
"mini.ai": { "branch": "main", "commit": "44d7df1340b16b16b27b67fba07028cb57f45408" },
"mini.animate": { "branch": "main", "commit": "58226f659c43a9dd340fbe2f864c169f7e1e9b0d" },
"mini.comment": { "branch": "main", "commit": "40c1172c9ddb55b30dfaf7dad9f7663cb6bb438e" },
"mini.animate": { "branch": "main", "commit": "119b56f1a29a792561ee6bfc2c55c059f671d0ea" },
"mini.comment": { "branch": "main", "commit": "877acea5b2a32ff55f808fc0ebe9aa898648318c" },
"mini.indentscope": { "branch": "main", "commit": "f60e9b51a6214c73a170ffc5445ce91560981031" },
"mini.pairs": { "branch": "main", "commit": "963b800d0524eadd297199207011b98684205ada" },
"mini.surround": { "branch": "main", "commit": "ea2e9c4cdbddc826dc6eeac69b035f8220f65de5" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "e5594d53986b34e584e8afe2ea6ad99d6f6d2105" },
"neoconf.nvim": { "branch": "main", "commit": "0105986edc28810314f461a4100ff25b99ad1683" },
"neodev.nvim": { "branch": "main", "commit": "2daabebac1b0b2ab7abba298c1a8f07a542866a6" },
"noice.nvim": { "branch": "main", "commit": "f5178da0097e964b37951a0ebc078fdcc14280f3" },
"nui.nvim": { "branch": "main", "commit": "698e75814cd7c56b0dd8af4936bcef2d13807f3c" },
"null-ls.nvim": { "branch": "main", "commit": "77e53bc3bac34cc273be8ed9eb9ab78bcf67fa48" },
"nvim-cmp": { "branch": "main", "commit": "3ac8d6cd29c74ff482d8ea47d45e5081bfc3f5ad" },
"nvim-coverage": { "branch": "main", "commit": "7018f6d2b7fc8145bc32e0dfe9c1c63d7f6bced3" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "8c89efb93b8383666a6f989762c2f610f5f2c930" },
"neoconf.nvim": { "branch": "main", "commit": "279c27f418f35397fe5b913d9d61d529cc038493" },
"neodev.nvim": { "branch": "main", "commit": "da3e9e05c60250984f1bf069d517d9fca5315453" },
"neotest": { "branch": "master", "commit": "80f9c963019dc72d46574ff0ccb9a428f232afc5" },
"neotest-go": { "branch": "main", "commit": "4e7a87967e45f2b357fd546b0b7877774191772e" },
"neotest-rust": { "branch": "main", "commit": "cc1821d580e8ee36bdd13d67b3291b8cd1792ec9" },
"noice.nvim": { "branch": "main", "commit": "7e358170cea2314d9768b3f63616e8fad186195e" },
"nui.nvim": { "branch": "main", "commit": "2b2732528e4a79eb8542568bd51d25f710395bd6" },
"null-ls.nvim": { "branch": "main", "commit": "4b055d84be42c90a7240785d3c83340d259d3d46" },
"nvim-cmp": { "branch": "main", "commit": "b43bfaf3229d6b39d8baaa567b13c6be0623bf12" },
"nvim-coverage": { "branch": "main", "commit": "8fcc71e01e93f305e334b59f902e545a70d0050f" },
"nvim-dap": { "branch": "master", "commit": "56118cee6af15cb9ddba9d080880949d8eeb0c9f" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "10f858c402eb985739627b7e69a38f5b2d79076b" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" },
"nvim-jdtls": { "branch": "master", "commit": "365811ecf97a08d0e2055fba210d65017344fd15" },
"nvim-jqx": { "branch": "master", "commit": "11b1d0368e5b23b9c356da8e5f70bb5827f27f62" },
"nvim-lspconfig": { "branch": "master", "commit": "570aae82f8c6bc15fb6e559ed7d5a3fd85374329" },
"nvim-lspconfig": { "branch": "master", "commit": "9166622781a39a829878d1fd24c174529d996838" },
"nvim-navic": { "branch": "master", "commit": "15704c607569d6c5cfeab486d3ef9459645a70ce" },
"nvim-notify": { "branch": "master", "commit": "f3024b912073774111202f5fa6518b0cd2a74432" },
"nvim-scrollview": { "branch": "main", "commit": "4a04039b80c270f6bd2075935cd3c7943f6ad140" },
"nvim-spectre": { "branch": "master", "commit": "1abe23ec9b7bc3082164f4cb842d521ef70e080e" },
"nvim-treesitter": { "branch": "master", "commit": "b8ddb83d606c9f7f6b76843246ee9820353b417e" },
"nvim-treesitter": { "branch": "master", "commit": "1d670b0c906716b1543270b3b087d44b09f3b523" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "95b76b95eff25e1e64f363938cd853852355d70a" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" },
"nvim-web-devicons": { "branch": "master", "commit": "e283ab937e0197b37ec5d8013e49495193407324" },
"nvim-web-devicons": { "branch": "master", "commit": "2a125024a137677930efcfdf720f205504c97268" },
"one-small-step-for-vimkind": { "branch": "main", "commit": "f239ca0dc772f214e7ff0627ccbd45bceae88bf8" },
"onedarkpro.nvim": { "branch": "main", "commit": "382c689c08803233da58f1141f713415772d9dc3" },
"package-info.nvim": { "branch": "master", "commit": "4d98c8cc90d970d87c472c04bf7ca712336cc753" },
"persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" },
"plenary.nvim": { "branch": "master", "commit": "58a496a55eddb7ef5464043be6c09296b992bd00" },
"plenary.nvim": { "branch": "master", "commit": "52544825d6b8be677eb395983515ad5e30ae1f2e" },
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
"rest.nvim": { "branch": "main", "commit": "d8dc204e9f6fd930d9d1d709f0d19138f804431a" },
"rust-tools.nvim": { "branch": "master", "commit": "71d2cf67b5ed120a0e31b2c8adb210dd2834242f" },
"scope.nvim": { "branch": "main", "commit": "066bdcf97a8634560428241c9176b9e6ef038055" },
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
"telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
"telescope-undo.nvim": { "branch": "main", "commit": "231b5ebb4328d2768c830c9a8d1b9c696116848d" },
"telescope.nvim": { "branch": "master", "commit": "80eefd8ff00145ef6ca4b7c64ef355b224f6e630" },
"telescope.nvim": { "branch": "master", "commit": "6d3fbffe426794296a77bb0b37b6ae0f4f14f807" },
"tidy.nvim": { "branch": "main", "commit": "b157a2b51144826fe49152f47185454687050dc4" },
"todo-comments.nvim": { "branch": "main", "commit": "09b0b17d824d2d56f02ff15967e8a2499a89c731" },
"trouble.nvim": { "branch": "main", "commit": "5da13b5007eb2b952834186cd640a22c765b64cf" },
"tokyonight.nvim": { "branch": "main", "commit": "cd5156f4b4a6c4c337a46deb0c0bd37319920833" },
"trouble.nvim": { "branch": "main", "commit": "324c977cfeacb8498ca9ba1c74cc35bd18858a8d" },
"typescript.nvim": { "branch": "main", "commit": "f66d4472606cb24615dfb7dbc6557e779d177624" },
"vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" },
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
"vim-startuptime": { "branch": "master", "commit": "5ddaf24df23f4d151970987c1322eaa247f08e69" },
"vim-startuptime": { "branch": "master", "commit": "8eed46917c5c4882b295729ce053265c2a74ac4d" },
"which-key.nvim": { "branch": "main", "commit": "e271c28118998c93a14d189af3395812a1aa646c" },
"zen-mode.nvim": { "branch": "main", "commit": "68f554702de63f4b7b6b6d4bcb10178f41a0acc7" }
}
4 changes: 3 additions & 1 deletion lua/config/lazy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ require("lazy").setup({
{ import = "lazyvim.plugins.extras.util.project" },
-- lazyvim dap core extension modules
{ import = "lazyvim.plugins.extras.dap.core" },
-- lazyvim coding extension modules
-- lazyvim test core extension modules
{ import = "lazyvim.plugins.extras.test.core" },
-- lazyvim copilot extension modules
-- { import = "lazyvim.plugins.extras.coding.copilot" },
-- import/override with your plugins
{ import = "plugins" },
Expand Down
49 changes: 19 additions & 30 deletions lua/plugins/coding.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,25 @@ return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
opts.ensure_installed = {
"bash",
"c",
"comment",
"diff",
"dockerfile",
"dot",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
"graphql",
"hcl",
"http",
"jq",
"lua",
"luadoc",
"luap",
"make",
"markdown",
"markdown_inline",
"mermaid",
"python",
"query",
"regex",
"sql",
"vim",
"vimdoc",
"yaml"
}
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, {
"comment",
"diff",
"dockerfile",
"dot",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
"graphql",
"hcl",
"http",
"jq",
"make",
"mermaid",
"sql"
})
end
end
},

Expand Down
63 changes: 26 additions & 37 deletions lua/plugins/colorscheme.lua
Original file line number Diff line number Diff line change
@@ -1,54 +1,43 @@
return {

-- disable tokyonight
{ "folke/tokyonight.nvim", enabled = false },

-- disable catppuccin
{ "catppuccin/nvim", name = "catppuccin", enabled = false },

-- load github nvim theme
{ "projekt0n/github-nvim-theme" },

-- load onedarkpro nvim theme
{ "olimorris/onedarkpro.nvim" },

-- Configure LazyVim to load color scheme
{
"LazyVim/LazyVim",
opts = {
colorscheme = function()
local colorscheme = os.getenv("NV_THEME")
if colorscheme ~= nil and string.match(colorscheme, "[L|l]ight") then
colorscheme = "github_light"
vim.o.background = "light"
local colorscheme = os.getenv("NV_THEME") or "dark"
local theme = ""
if colorscheme ~= nil then
if string.match(colorscheme, "[G|g]it[H|h]ub") ~= nil then
theme = "github"
else
if string.match(colorscheme, "[O|o]ne[D|d]ark") ~= nil then
theme = "onedark"
end
end
if string.match(colorscheme, "[L|l]ight") then
colorscheme = "light"
vim.o.background = "light"
else
colorscheme = "dark"
vim.o.background = "dark"
end
end
local has_theme, nvim_theme = pcall(require, "plugins.extras.theme." .. theme)
if has_theme then
nvim_theme.setup(colorscheme)
else
colorscheme = "github_dark_dimmed"
vim.o.background = "dark"
require("tokyonight").load() -- fallback to tokyo night if not otherwise specified
end
local theme = require("github-theme");
local opts = {
options = {
transparent = false, -- Disable setting background
terminal_colors = true, -- Set terminal colors (vim.g.terminal_color_*) used in `:terminal`
dim_inactive = true,
},
styles = {
comments = "NONE", -- Style that is applied to comments
keywords = "NONE", -- Style that is applied to keywords
},
darken = { -- Darken floating windows and sidebar-like windows
floats = true,
sidebars = {
enable = false,
},
},
groups = {
all = {
AlphaHeader = { link = 'Title' },
AlphaButtons = { link = 'Identifier' },
AlphaShortcut = { link = 'Keyword' },
AlphaFooter = { link = 'Comment' },
}
}
}
theme.setup(opts)
vim.cmd("colorscheme " .. colorscheme)
end
},
},
Expand Down
12 changes: 9 additions & 3 deletions lua/plugins/extras/lang/java.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,29 @@ return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, { "java" })
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "java" })
end
end,
},

-- correctly setup mason lsp extensions
{
"williamboman/mason.nvim",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, { "jdtls" })
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "jdtls" })
end
end,
},

-- correctly setup mason dap extensions
{
"jay-babu/mason-nvim-dap.nvim",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, { "javatest", "javadbg" })
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "javatest", "javadbg" })
end
end,
},

Expand Down
8 changes: 6 additions & 2 deletions lua/plugins/extras/lang/nodejs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@ return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, { "css", "html", "javascript", "jsdoc", "scss" })
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "css", "html", "javascript", "jsdoc", "scss" })
end
end,
},

-- correctly setup mason lsp extensions
{
"williamboman/mason.nvim",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, { "css-lsp", "html-lsp", "stylelint-lsp", "typescript-language-server" })
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "css-lsp", "html-lsp", "stylelint-lsp", "typescript-language-server" })
end
end,
},

Expand Down
31 changes: 27 additions & 4 deletions lua/plugins/extras/lang/rust.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,29 @@ return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, { "ron", "rust", "toml" })
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "ron", "rust", "toml" })
end
end,
},

-- correctly setup mason lsp extensions
{
"williamboman/mason.nvim",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, { "rust-analyzer", "taplo" })
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "rust-analyzer", "taplo" })
end
end,
},

-- correctly setup mason dap extensions
{
"jay-babu/mason-nvim-dap.nvim",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, { "codelldb" })
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "codelldb" })
end
end,
},

Expand Down Expand Up @@ -96,7 +102,6 @@ return {
local codelldb_path = extension_path .. 'adapter/codelldb'
local liblldb_path = vim.fn.has "mac" == 1 and extension_path .. 'lldb/lib/liblldb.dylib' or
extension_path .. 'lldb/lib/liblldb.so'

rust_tools_opts = vim.tbl_deep_extend("force", rust_tools_opts, {
dap = {
adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_path, liblldb_path)
Expand Down Expand Up @@ -126,4 +131,22 @@ return {
},
},
},
-- neotest setup
{
"nvim-neotest/neotest",
optional = true,
dependencies = {
"rouge8/neotest-rust",
},
opts = {
adapters = {
["neotest-rust"] = {
-- Here we can set options for neotest-rust, e.g.
-- args = { "-tags=integration" }
dap_adapter = "lldb"
},
},
},
},

}
Loading

0 comments on commit 6a1d2f7

Please sign in to comment.