2023-11-22 13:11:41 +00:00
|
|
|
{ pkgs, ... }:
|
2023-11-22 18:14:10 +00:00
|
|
|
let
|
|
|
|
codelldb = pkgs.writeShellScriptBin "codelldb" ''
|
|
|
|
exec ${pkgs.vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb "$@"
|
|
|
|
'';
|
|
|
|
in
|
2023-11-22 13:11:41 +00:00
|
|
|
{
|
|
|
|
home.packages = with pkgs; [
|
2023-11-22 17:41:05 +00:00
|
|
|
bear
|
|
|
|
clang
|
2023-11-22 13:11:41 +00:00
|
|
|
clang-tools
|
2023-11-22 18:14:10 +00:00
|
|
|
codelldb
|
|
|
|
gnumake
|
2023-11-22 13:11:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
programs.neovim = {
|
|
|
|
nvim-dap = ''
|
2024-01-04 17:01:01 +00:00
|
|
|
require('cxx.init').nvim_dap()
|
2023-11-22 13:11:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nvim-lspconfig = ''
|
2024-01-04 17:01:01 +00:00
|
|
|
require('cxx.init').nvim_lspconfig()
|
2023-11-26 12:52:46 +00:00
|
|
|
|
|
|
|
vim.filetype.add({
|
|
|
|
pattern = {
|
|
|
|
['.*%.h'] = 'c',
|
|
|
|
},
|
|
|
|
})
|
2023-11-22 13:11:41 +00:00
|
|
|
'';
|
2024-01-05 21:28:36 +00:00
|
|
|
|
|
|
|
nvim-snippets = ''
|
|
|
|
require('luasnip').add_snippets('c', require('cxx.snippets'))
|
|
|
|
require('luasnip').add_snippets('cpp', require('cxx.snippets'))
|
|
|
|
'';
|
2023-11-22 13:11:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
xdg.configFile."nvim/after/ftplugin/c.lua".text = ''
|
2024-01-04 17:01:01 +00:00
|
|
|
require('utils.dap').buffer_map()
|
2023-11-22 13:11:41 +00:00
|
|
|
'';
|
|
|
|
}
|