1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 19:30:01 +02:00

some nvim touching

This commit is contained in:
Henrik Hautakoski 2024-04-03 21:02:20 +02:00
parent 6dd8f632ad
commit f910f44191
29 changed files with 467 additions and 233 deletions

View file

@ -17,8 +17,8 @@ return {
local selectNext = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert })
local border = cmp.config.window.bordered({
border = {'', '', '', '', '', '', '', ''},
winhighlight = 'Normal:None,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None'
-- border = {'┌', '─', '┐', '│', '┘', '─', '└', '│'},
winhighlight = 'Normal:NormalFloat,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None'
})
return {

View file

@ -38,11 +38,47 @@ return {
},
keys = {
{ "<leader>Dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" },
{ "<leader>Db", function() require'dap'.toggle_breakpoint() end, desc = "Toggle breakpoint" },
},
config = function()
-- local Config = require("lazyvim.config")
vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" })
local dap = require "dap"
dap.adapters.delve = {
type = 'server',
port = '${port}',
executable = {
command = 'dlv',
args = {'dap', '-l', '127.0.0.1:${port}'},
}
}
dap.configurations.go = {
{
type = "delve",
name = "Debug",
request = "launch",
program = "${file}"
},
{
type = "delve",
name = "Debug test", -- configuration for debugging test files
request = "launch",
mode = "test",
program = "${file}"
},
-- works with go.mod packages and sub packages
{
type = "delve",
name = "Debug test (go.mod)",
request = "launch",
mode = "test",
program = "./${relativeFileDirname}"
}
}
-- local Config = require("lazyvim.config")
-- for name, sign in pairs(Config.icons.dap) do
-- sign = type(sign) == "table" and sign or { sign }
-- vim.fn.sign_define(

View file

@ -1,6 +1,7 @@
return {
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter",
@ -22,7 +23,7 @@ return {
{"<leader>ta", ":lua require('neotest').output_panel.open()<cr>:lua require('neotest').run.run({suite = true})<cr>", desc = "test all"},
{"<leader>ts", ":lua require('neotest').run.stop()<cr>", desc = "stop test"},
{"<leader>tq", ":lua require('neotest').output_panel.close()<cr>", desc = "close output window"},
{"<leader>te", ":lua require('neotest').summary()<cr>"}
{"<leader>te", ":Neotest summary<cr>", desc = "Open test explorer"}
},
opts = function()
local icons = require('config.icons').test
@ -48,6 +49,9 @@ return {
skipped = icons.skipped,
unknown = icons.unknown,
watching = icons.watch
},
summery = {
open = "botleft vsplit"
}
}
end

View file

@ -1,83 +0,0 @@
return {
'nvim-treesitter/nvim-treesitter',
build = function()
require('nvim-treesitter.install').update({ with_sync = true })
end,
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
'nvim-treesitter/playground'
},
opts = {
-- A list of parser names
ensure_installed = {
"bash",
"c",
"cpp",
"ninja",
"cmake",
"dockerfile",
"make",
"lua",
"vim",
"vimdoc",
"query",
"php",
"phpdoc",
"blade",
"go",
"gomod",
"gosum",
"javascript",
"typescript",
"css",
"scss",
"html",
"vue",
"json",
"jsonc",
"yaml",
"toml",
"xml",
"glsl",
"hlsl",
"markdown"
},
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = true,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = false,
highlight = {
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
indent = {
enable = true
}
},
config = function(_, opts)
local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
parser_config.blade = {
install_info = {
url = 'https://github.com/EmranMR/tree-sitter-blade',
branch = "main",
files = { 'src/parser.c' },
generate_requires_npm = true,
requires_generate_from_grammar = true,
},
filetype = 'blade',
}
require("nvim-treesitter.configs").setup(opts)
end,
}