diff --git a/community.lua b/community.lua new file mode 100644 index 0000000..559bf29 --- /dev/null +++ b/community.lua @@ -0,0 +1,63 @@ +local utils = require "astronvim.utils" + +return { + -- Add the community repository of plugin specifications + "AstroNvim/astrocommunity", + -- example of imporing a plugin, comment out to use it or add your own + -- available plugins can be found at https://github.com/AstroNvim/astrocommunity + { import = "astrocommunity.colorscheme.catppuccin", enabled = true }, + --{ import = "astrocommunity.colorscheme." }, + + { import = "astrocommunity.pack.python" }, + +-- css and html + { import = "astrocommunity.pack.json" }, + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if opts.ensure_installed ~= "all" then + opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "html", "css" }) + end + end, + }, + { + "williamboman/mason-lspconfig.nvim", + opts = function(_, opts) + opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "html", "cssls" }) + end, + }, + { + "andythigpen/nvim-coverage", + event = "User AstroFile", + requires = { "nvim-lua/plenary.nvim" }, + }, + { + "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", + }, + } + end, + ft = { "go", "rust", "python" }, + dependencies = { + "nvim-neotest/neotest-go", + "nvim-neotest/neotest-python", + "rouge8/neotest-rust", + }, + }, +} diff --git a/user.lua b/user.lua new file mode 100644 index 0000000..b9741f2 --- /dev/null +++ b/user.lua @@ -0,0 +1,15 @@ +return { + lsp = { + formatting = { + format_on_save = true, -- enable or disable automatic formatting on save + timeout_ms = 3200, -- adjust the timeout_ms variable for formatting + }, + }, + options = { + opt = { + foldenable = false, + foldexpr = "nvim_treesitter#foldexpr()", -- set Treesitter based folding + foldmethod = "expr", + }, + }, +} \ No newline at end of file