.
This commit is contained in:
parent
73ff9ee8ee
commit
664eb70e8c
14 changed files with 698 additions and 495 deletions
|
|
@ -86,6 +86,7 @@ in
|
|||
blade = { "blade-formatter" },
|
||||
go = { "gofmt" },
|
||||
wgsl = { "wgsl_fmt" },
|
||||
odin = { "odinfmt" },
|
||||
},
|
||||
})
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
|
|
@ -127,7 +128,14 @@ in
|
|||
},
|
||||
adapters = {
|
||||
require('neotest-pest'),
|
||||
}
|
||||
require('neotest-zig'),
|
||||
-- require('neotest-odin'),
|
||||
},
|
||||
watch = {
|
||||
filter_path = function(path, root)
|
||||
return true
|
||||
end,
|
||||
},
|
||||
})
|
||||
vim.keymap.set('n', '<localleader>pn', function() require('neotest').run.run() end, { desc = "test nearest" })
|
||||
vim.keymap.set('n', '<localleader>pe', function() require('neotest').run.run(vim.fn.expand('%')) end, { desc = "test file" })
|
||||
|
|
@ -138,6 +146,10 @@ in
|
|||
type = "lua";
|
||||
}
|
||||
# {
|
||||
# plugin = neotest-zig;
|
||||
# type = "lua";
|
||||
# }
|
||||
# {
|
||||
# plugin = nvim-autopairs;
|
||||
# type = "lua";
|
||||
# config = ''
|
||||
|
|
@ -149,19 +161,43 @@ in
|
|||
type = "lua";
|
||||
config = ''
|
||||
local dap = require("dap")
|
||||
dap.adapters.php = {
|
||||
type = 'executable',
|
||||
command = '${pkgs.nodejs}/bin/node',
|
||||
args = { '${pkgs.vscode-extensions.xdebug.php-debug}/share/vscode/extensions/xdebug.php-debug/out/phpDebug.js' },
|
||||
dap.adapters = {
|
||||
php = {
|
||||
type = "executable",
|
||||
command = "${pkgs.nodejs}/bin/node",
|
||||
args = { "${pkgs.vscode-extensions.xdebug.php-debug}/share/vscode/extensions/xdebug.php-debug/out/phpDebug.js" },
|
||||
},
|
||||
|
||||
codelldb = {
|
||||
type = "server",
|
||||
port = "''${port}",
|
||||
executable = {
|
||||
command = '${pkgs.vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb',
|
||||
args = { "--port", "''${port}" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
dap.configurations.php = {
|
||||
{
|
||||
type = 'php',
|
||||
request = 'launch',
|
||||
name = 'listen for xdebug',
|
||||
port = 9003,
|
||||
}
|
||||
dap.configurations = {
|
||||
php = {
|
||||
{
|
||||
type = 'php',
|
||||
request = 'launch',
|
||||
name = 'listen for xdebug',
|
||||
port = 9003,
|
||||
}
|
||||
},
|
||||
zig = {
|
||||
{
|
||||
name = 'launch',
|
||||
type = 'codelldb',
|
||||
request = 'launch',
|
||||
program = "''${workspaceFolder}/zig-out/bin/''${workspaceFolderBasename}",
|
||||
cwd = "''${workspaceFolder}",
|
||||
stopOnEntry = false,
|
||||
args = {},
|
||||
}
|
||||
},
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
@ -199,7 +235,7 @@ in
|
|||
'fsharp', 'git_config', 'git_rebase', 'gitignore', 'glsl', 'go', 'gomod', 'graphql',
|
||||
'haskell', 'hlsl', 'http', 'ini', 'javadoc', 'jq', 'jsdoc', 'json', 'json5', 'kitty',
|
||||
'latex', 'markdown', 'nginx', 'nix', 'php', 'php_only', 'phpdoc', 'regex', 'rust', 'sql',
|
||||
'ssh_config', 'tmux', 'vim', 'wgsl', 'yaml', 'zig', 'ols',
|
||||
'ssh_config', 'tmux', 'vim', 'wgsl', 'yaml', 'zig', 'odin',
|
||||
},
|
||||
callback = function()
|
||||
vim.treesitter.start()
|
||||
|
|
@ -246,12 +282,11 @@ in
|
|||
config = ''
|
||||
vim.o.autoread = true
|
||||
-- Recommended/example keymaps.
|
||||
vim.keymap.set({ "n", "x" }, "<C-a>", function() require("opencode").ask("@this: ", { submit = true }) end, { desc = "Ask opencode…" })
|
||||
vim.keymap.set({ "n", "x" }, "<leader>h", function() require("opencode").ask("@this: ", { submit = true }) end, { desc = "Ask opencode…" })
|
||||
vim.keymap.set({ "n", "x" }, "<C-x>", function() require("opencode").select() end, { desc = "Execute opencode action…" })
|
||||
vim.keymap.set({ "n", "t" }, "<C-.>", function() require("opencode").toggle() end, { desc = "Toggle opencode" })
|
||||
|
||||
vim.keymap.set({ "n", "x" }, "go", function() return require("opencode").operator("@this ") end, { desc = "Add range to opencode", expr = true })
|
||||
vim.keymap.set("n", "goo", function() return require("opencode").operator("@this ") .. "_" end, { desc = "Add line to opencode", expr = true })
|
||||
|
||||
vim.keymap.set("n", "<S-C-u>", function() require("opencode").command("session.half.page.up") end, { desc = "Scroll opencode up" })
|
||||
vim.keymap.set("n", "<S-C-d>", function() require("opencode").command("session.half.page.down") end, { desc = "Scroll opencode down" })
|
||||
|
|
@ -406,7 +441,7 @@ in
|
|||
extraConfig = ''
|
||||
colorscheme ${cfg.colorscheme}
|
||||
'';
|
||||
extraLuaConfig = ''
|
||||
initLua = ''
|
||||
${builtins.readFile ./settings.lua}
|
||||
${builtins.replaceStrings [ "@HOSTNAME@" ] [ cfg.hostname ] (builtins.readFile ./plugins.lua)}
|
||||
require("custom")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue