📝 Got nvim ready for testing
This commit is contained in:
parent
4886efa989
commit
230b003e01
3 changed files with 23 additions and 8 deletions
|
|
@ -14,10 +14,7 @@ require('nvim-autopairs').setup{}
|
|||
require('gitsigns').setup()
|
||||
-- nvim-treesiter configuration: -- setup with all defaults
|
||||
require'nvim-treesitter.configs'.setup{
|
||||
ensure_installed = {"bash", "c", "c_sharp", "cmake", "cpp", "css", "dockerfile", "go", "html", "http", "java", "javascript", "json", "json5", "jsonc", "lua", "make", "perl", "php", "pug", "python", "regex", "ruby", "toml", "tsx", "typescript", "rust", "vim", "vue", "wgsl", "yaml",},
|
||||
highlight = { enable = 'true' }
|
||||
}
|
||||
|
||||
ensure_installed = {"bash", "c", "c_sharp", "cmake", "cpp", "css", "dockerfile", "go", "html", "http", "java", "javascript", "json", "json5", "jsonc", "lua", "make", "perl", "php", "pug", "python", "regex", "ruby", "toml", "tsx", "typescript", "rust", "vim", "vue", "wgsl", "yaml",}, highlight = { enable = 'true' } }
|
||||
-- To enable basic vim folding methods/expressions:
|
||||
--
|
||||
-- vim.opt.foldmethod = "expr"
|
||||
|
|
@ -96,7 +93,7 @@ local on_attach = function(client)
|
|||
require'completion'.on_attach(client)
|
||||
end
|
||||
|
||||
-- Enable quick-lint-js
|
||||
-- Enable quick-lint-js lsp
|
||||
require('lspconfig/quick_lint_js').setup {}
|
||||
|
||||
-- Enable use of ripgrep
|
||||
|
|
@ -119,7 +116,7 @@ vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
|
|||
}
|
||||
)
|
||||
|
||||
-- Enable rust-analyzer
|
||||
-- Enable rust-analyzer lsp
|
||||
lspconfig.rust_analyzer.setup({
|
||||
on_attach=on_attach,
|
||||
settings = {
|
||||
|
|
@ -150,6 +147,24 @@ for _, lsp in ipairs(servers) do
|
|||
}
|
||||
end
|
||||
|
||||
-- neotest setup
|
||||
require('neotest').setup({
|
||||
adapters = {
|
||||
require('neotest-jest')({
|
||||
jestCommand = "npm test --",
|
||||
jestConfigFile = "custom.jest.config.ts",
|
||||
env = { CI = true },
|
||||
cwd = function(path)
|
||||
return vim.fn.getcwd()
|
||||
end,
|
||||
}),
|
||||
require('neotest-python'),
|
||||
require('neotest-rust')
|
||||
}
|
||||
})
|
||||
|
||||
require('neotest').run.run()
|
||||
|
||||
-- Nvim_Tree configuration: -- setup with all defaults
|
||||
-- each of these are documented in `:help nvim-tree.OPTION_NAME`
|
||||
require'nvim-tree'.setup { -- BEGIN_DEFAULT_OPTS
|
||||
|
|
@ -378,5 +393,6 @@ vim.cmd[[hi! NonText ctermbg=NONE guibg=NONE]]
|
|||
-- never create swap files
|
||||
vim.cmd[[set noswapfile]]
|
||||
|
||||
|
||||
-- do not close the markdown preview tab when switching to other buffers
|
||||
-- vim.g.mkdp_auto_close = 0
|
||||
|
|
|
|||
|
|
@ -49,11 +49,11 @@ require('packer').startup(function()
|
|||
use 'windwp/nvim-autopairs'
|
||||
use 'simeji/winresizer'
|
||||
use '907th/vim-auto-save'
|
||||
use 'David-Kunz/jester' -- for unit tests using jest
|
||||
use 'rinx/nvim-ripgrep'
|
||||
use 'sbdchd/neoformat' -- general formatter for various languages
|
||||
use 'rhysd/vim-clang-format' -- formatter for c and c++
|
||||
use { 'sindrets/diffview.nvim', requires = 'nvim-lua/plenary.nvim' }
|
||||
use 'arrufat/vala.vim' -- for vala programming language
|
||||
use 'chemzqm/neovim'
|
||||
use {'nvim-neotest/neotest', requires = { 'nvim-lua/plenary.nvim', 'nvim-treesitter/nvim-treesitter', 'antoinemadec/FixCursorHold.nvim', 'haydenmeade/neotest-jest', 'nvim-neotest/neotest-python', 'rouge8/neotest-rust' }}
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -37,5 +37,4 @@ make sure to install all of the test files (jest should already be set up, but y
|
|||
|
||||
doas npm install -g jest
|
||||
pip install pytest
|
||||
cargo install rstest
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue