📝 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()
|
require('gitsigns').setup()
|
||||||
-- nvim-treesiter configuration: -- setup with all defaults
|
-- nvim-treesiter configuration: -- setup with all defaults
|
||||||
require'nvim-treesitter.configs'.setup{
|
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",},
|
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' } }
|
||||||
highlight = { enable = 'true' }
|
|
||||||
}
|
|
||||||
|
|
||||||
-- To enable basic vim folding methods/expressions:
|
-- To enable basic vim folding methods/expressions:
|
||||||
--
|
--
|
||||||
-- vim.opt.foldmethod = "expr"
|
-- vim.opt.foldmethod = "expr"
|
||||||
|
|
@ -96,7 +93,7 @@ local on_attach = function(client)
|
||||||
require'completion'.on_attach(client)
|
require'completion'.on_attach(client)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Enable quick-lint-js
|
-- Enable quick-lint-js lsp
|
||||||
require('lspconfig/quick_lint_js').setup {}
|
require('lspconfig/quick_lint_js').setup {}
|
||||||
|
|
||||||
-- Enable use of ripgrep
|
-- 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({
|
lspconfig.rust_analyzer.setup({
|
||||||
on_attach=on_attach,
|
on_attach=on_attach,
|
||||||
settings = {
|
settings = {
|
||||||
|
|
@ -150,6 +147,24 @@ for _, lsp in ipairs(servers) do
|
||||||
}
|
}
|
||||||
end
|
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
|
-- Nvim_Tree configuration: -- setup with all defaults
|
||||||
-- each of these are documented in `:help nvim-tree.OPTION_NAME`
|
-- each of these are documented in `:help nvim-tree.OPTION_NAME`
|
||||||
require'nvim-tree'.setup { -- BEGIN_DEFAULT_OPTS
|
require'nvim-tree'.setup { -- BEGIN_DEFAULT_OPTS
|
||||||
|
|
@ -378,5 +393,6 @@ vim.cmd[[hi! NonText ctermbg=NONE guibg=NONE]]
|
||||||
-- never create swap files
|
-- never create swap files
|
||||||
vim.cmd[[set noswapfile]]
|
vim.cmd[[set noswapfile]]
|
||||||
|
|
||||||
|
|
||||||
-- do not close the markdown preview tab when switching to other buffers
|
-- do not close the markdown preview tab when switching to other buffers
|
||||||
-- vim.g.mkdp_auto_close = 0
|
-- vim.g.mkdp_auto_close = 0
|
||||||
|
|
|
||||||
|
|
@ -49,11 +49,11 @@ require('packer').startup(function()
|
||||||
use 'windwp/nvim-autopairs'
|
use 'windwp/nvim-autopairs'
|
||||||
use 'simeji/winresizer'
|
use 'simeji/winresizer'
|
||||||
use '907th/vim-auto-save'
|
use '907th/vim-auto-save'
|
||||||
use 'David-Kunz/jester' -- for unit tests using jest
|
|
||||||
use 'rinx/nvim-ripgrep'
|
use 'rinx/nvim-ripgrep'
|
||||||
use 'sbdchd/neoformat' -- general formatter for various languages
|
use 'sbdchd/neoformat' -- general formatter for various languages
|
||||||
use 'rhysd/vim-clang-format' -- formatter for c and c++
|
use 'rhysd/vim-clang-format' -- formatter for c and c++
|
||||||
use { 'sindrets/diffview.nvim', requires = 'nvim-lua/plenary.nvim' }
|
use { 'sindrets/diffview.nvim', requires = 'nvim-lua/plenary.nvim' }
|
||||||
use 'arrufat/vala.vim' -- for vala programming language
|
use 'arrufat/vala.vim' -- for vala programming language
|
||||||
use 'chemzqm/neovim'
|
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)
|
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
|
doas npm install -g jest
|
||||||
pip install pytest
|
pip install pytest
|
||||||
cargo install rstest
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue