Compare commits
16 Commits
49e56875cd
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| bcc5185ef4 | |||
| 50ffcb48e2 | |||
| 7f39cf1992 | |||
| 3ba1175ea9 | |||
| 24f67e2676 | |||
| 373cbf1815 | |||
| 71bf667d83 | |||
| 86428c0a28 | |||
| f5612d98c5 | |||
| 3c7ac8bf4e | |||
| 594ead9898 | |||
| 469864dd50 | |||
| 31fabb6b78 | |||
| 65d54f0c2e | |||
| 3d764647bd | |||
| 149b02f6a1 |
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
plugins = {
|
|
||||||
bufferline.enable = true;
|
|
||||||
web-devicons.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
43
config/cmp.nix
Normal file
43
config/cmp.nix
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{ ... }: {
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
|
||||||
|
cmp-nvim-lsp.enable = true;
|
||||||
|
|
||||||
|
cmp = {
|
||||||
|
enable = true;
|
||||||
|
autoEnableSources = true;
|
||||||
|
settings = {
|
||||||
|
sources = [
|
||||||
|
{ name = "nvim_lsp"; }
|
||||||
|
{ name = "path"; }
|
||||||
|
{ name = "buffer"; }
|
||||||
|
{ name = "luasnip"; }
|
||||||
|
# { name = "cmdline"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
completion = {
|
||||||
|
completeopt = "menu,menuone,noinsert";
|
||||||
|
};
|
||||||
|
|
||||||
|
mapping = {
|
||||||
|
"<C-n>" = "cmp.mapping.select_next_item()";
|
||||||
|
"<C-p>" = "cmp.mapping.select_prev_item()";
|
||||||
|
"<C-y>" = "cmp.mapping.confirm({ select = true })";
|
||||||
|
"<C-Space>" = "cmp.mapping.complete()";
|
||||||
|
"<C-e>" = "cmp.mapping.abort()";
|
||||||
|
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
||||||
|
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||||
|
};
|
||||||
|
|
||||||
|
snippet.expand = ''
|
||||||
|
function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body)
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
116
config/dap.nix
Normal file
116
config/dap.nix
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
{ lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
|
||||||
|
dap = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
adapters = {
|
||||||
|
executables = {
|
||||||
|
lldb = {
|
||||||
|
command = lib.getExe' pkgs.lldb "lldb-dap";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
servers = {
|
||||||
|
codelldb = {
|
||||||
|
port = 13000;
|
||||||
|
executable = {
|
||||||
|
command = "${pkgs.vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb";
|
||||||
|
args = [
|
||||||
|
"--port"
|
||||||
|
"13000"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
configurations = let
|
||||||
|
codelldb-config = {
|
||||||
|
name = "Launch (CodeLLDB)";
|
||||||
|
type = "codelldb";
|
||||||
|
request = "launch";
|
||||||
|
program.__raw = ''
|
||||||
|
function()
|
||||||
|
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. '/', "file")
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
cwd = ''''${workspaceFolder}'';
|
||||||
|
stopOnEntry = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
lldb-config = {
|
||||||
|
name = "Launch (LLDB)";
|
||||||
|
type = "lldb";
|
||||||
|
request = "launch";
|
||||||
|
program.__raw = ''
|
||||||
|
function()
|
||||||
|
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. '/', "file")
|
||||||
|
end'';
|
||||||
|
cwd = ''''${workspaceFolder}'';
|
||||||
|
stopOnEntry = false;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
c = [ lldb-config ];
|
||||||
|
|
||||||
|
cpp =
|
||||||
|
[ lldb-config ]
|
||||||
|
++ lib.optionals pkgs.stdenv.isLinux [
|
||||||
|
codelldb-config
|
||||||
|
];
|
||||||
|
|
||||||
|
rust =
|
||||||
|
[ lldb-config ]
|
||||||
|
++ lib.optionals pkgs.stdenv.isLinux [
|
||||||
|
codelldb-config
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
dap-ui = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# Set icons to characters that are more likely to work in every terminal.
|
||||||
|
# Feel free to remove or use ones that you like more! :)
|
||||||
|
# Don't feel like these are good choices.
|
||||||
|
settings = {
|
||||||
|
icons = {
|
||||||
|
expanded = "▾";
|
||||||
|
collapsed = "▸";
|
||||||
|
current_frame = "*";
|
||||||
|
};
|
||||||
|
|
||||||
|
controls = {
|
||||||
|
icons = {
|
||||||
|
pause = "⏸";
|
||||||
|
play = "▶";
|
||||||
|
step_into = "⏎";
|
||||||
|
step_over = "⏭";
|
||||||
|
step_out = "⏮";
|
||||||
|
step_back = "b";
|
||||||
|
run_last = "▶▶";
|
||||||
|
terminate = "⏹";
|
||||||
|
disconnect = "⏏";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
dap-virtual-text.enable = true;
|
||||||
|
|
||||||
|
# Add debuggers here
|
||||||
|
dap-python = {
|
||||||
|
enable = true;
|
||||||
|
adapterPythonPath = "python";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
dap-lldb = {
|
||||||
|
enable = true;
|
||||||
|
settings.codelldb_path = "${pkgs.vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,189 +1,17 @@
|
|||||||
{ pkgs, opts, ... }: {
|
{ pkgs, opts, ... }: {
|
||||||
# Import all your configuration modules here
|
# Import all your configuration modules here
|
||||||
imports = [ ./bufferline.nix ];
|
imports = [
|
||||||
|
./cmp.nix
|
||||||
|
./dap.nix
|
||||||
|
./lsp.nix
|
||||||
|
./plugins.nix
|
||||||
|
./keymaps.nix
|
||||||
|
];
|
||||||
|
|
||||||
plugins = {
|
extraPackages = with pkgs; [
|
||||||
|
coreutils
|
||||||
lualine.enable = true;
|
lldb_18
|
||||||
|
];
|
||||||
luasnip.enable = true;
|
|
||||||
|
|
||||||
barbar.enable = true;
|
|
||||||
|
|
||||||
nvim-tree.enable = true;
|
|
||||||
|
|
||||||
noice.enable = true;
|
|
||||||
|
|
||||||
mini.enable = true;
|
|
||||||
|
|
||||||
notify.enable = true;
|
|
||||||
|
|
||||||
telescope.enable = true;
|
|
||||||
|
|
||||||
treesitter.enable = true;
|
|
||||||
|
|
||||||
render-markdown.enable = true;
|
|
||||||
|
|
||||||
web-devicons.enable = true;
|
|
||||||
|
|
||||||
cmp-nvim-lsp.enable = true;
|
|
||||||
|
|
||||||
lsp = {
|
|
||||||
enable = true;
|
|
||||||
servers = {
|
|
||||||
#js/typescript
|
|
||||||
ts_ls.enable = true;
|
|
||||||
#c/c++
|
|
||||||
ccls.enable = true;
|
|
||||||
#nix
|
|
||||||
nil_ls.enable = true;
|
|
||||||
#python
|
|
||||||
pyright.enable = true;
|
|
||||||
#bash
|
|
||||||
bashls.enable = true;
|
|
||||||
#css
|
|
||||||
cssls.enable = true;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
keymaps = {
|
|
||||||
# Diagnostic keymaps
|
|
||||||
diagnostic = {
|
|
||||||
"<leader>q" = {
|
|
||||||
#mode = "n";
|
|
||||||
action = "setloclist";
|
|
||||||
desc = "Open diagnostic [Q]uickfix list";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
extra = [
|
|
||||||
# Jump to the definition of the word under your cusor.
|
|
||||||
# This is where a variable was first declared, or where a function is defined, etc.
|
|
||||||
# To jump back, press <C-t>.
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "gd";
|
|
||||||
action.__raw = "require('telescope.builtin').lsp_definitions";
|
|
||||||
options = {
|
|
||||||
desc = "LSP: [G]oto [D]efinition";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
# Find references for the word under your cursor.
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "gr";
|
|
||||||
action.__raw = "require('telescope.builtin').lsp_references";
|
|
||||||
options = {
|
|
||||||
desc = "LSP: [G]oto [R]eferences";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
# Jump to the implementation of the word under your cursor.
|
|
||||||
# Useful when your language has ways of declaring types without an actual implementation.
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "gI";
|
|
||||||
action.__raw = "require('telescope.builtin').lsp_implementations";
|
|
||||||
options = {
|
|
||||||
desc = "LSP: [G]oto [I]mplementation";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
# Jump to the type of the word under your cursor.
|
|
||||||
# Useful when you're not sure what type a variable is and you want to see
|
|
||||||
# the definition of its *type*, not where it was *defined*.
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>D";
|
|
||||||
action.__raw = "require('telescope.builtin').lsp_type_definitions";
|
|
||||||
options = {
|
|
||||||
desc = "LSP: Type [D]efinition";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
# Fuzzy find all the symbols in your current document.
|
|
||||||
# Symbols are things like variables, functions, types, etc.
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>ds";
|
|
||||||
action.__raw = "require('telescope.builtin').lsp_document_symbols";
|
|
||||||
options = {
|
|
||||||
desc = "LSP: [D]ocument [S]ymbols";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
# Fuzzy find all the symbols in your current workspace.
|
|
||||||
# Similar to document symbols, except searches over your entire project.
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>ws";
|
|
||||||
action.__raw = "require('telescope.builtin').lsp_dynamic_workspace_symbols";
|
|
||||||
options = {
|
|
||||||
desc = "LSP: [W]orkspace [S]ymbols";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
lspBuf = {
|
|
||||||
# Rename the variable under your cursor.
|
|
||||||
# Most Language Servers support renaming across files, etc.
|
|
||||||
"<leader>rn" = {
|
|
||||||
action = "rename";
|
|
||||||
desc = "LSP: [R]e[n]ame";
|
|
||||||
};
|
|
||||||
# Execute a code action, usually your cursor needs to be on top of an error
|
|
||||||
# or a suggestion from your LSP for this to activate.
|
|
||||||
"<leader>ca" = {
|
|
||||||
#mode = "n";
|
|
||||||
action = "code_action";
|
|
||||||
desc = "LSP: [C]ode [A]ction";
|
|
||||||
};
|
|
||||||
# WARN: This is not Goto Definition, this is Goto Declaration.
|
|
||||||
# For example, in C this would take you to the header.
|
|
||||||
"gD" = {
|
|
||||||
action = "declaration";
|
|
||||||
desc = "LSP: [G]oto [D]eclaration";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
cmp = {
|
|
||||||
enable = true;
|
|
||||||
autoEnableSources = true;
|
|
||||||
settings = {
|
|
||||||
sources = [
|
|
||||||
{ name = "nvim_lsp"; }
|
|
||||||
{ name = "path"; }
|
|
||||||
{ name = "buffer"; }
|
|
||||||
{ name = "luasnip"; }
|
|
||||||
# { name = "cmdline"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
completion = {
|
|
||||||
completeopt = "menu,menuone,noinsert";
|
|
||||||
};
|
|
||||||
|
|
||||||
mapping = {
|
|
||||||
"<C-n>" = "cmp.mapping.select_next_item()";
|
|
||||||
"<C-p>" = "cmp.mapping.select_prev_item()";
|
|
||||||
"<C-y>" = "cmp.mapping.confirm({ select = true })";
|
|
||||||
"<C-Space>" = "cmp.mapping.complete()";
|
|
||||||
"<C-e>" = "cmp.mapping.abort()";
|
|
||||||
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
|
||||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
|
||||||
};
|
|
||||||
|
|
||||||
snippet.expand = ''
|
|
||||||
function(args)
|
|
||||||
require("luasnip").lsp_expand(args.body)
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
globals = {
|
|
||||||
mapleader = " ";
|
|
||||||
maplocalleader = " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
nu = true;
|
nu = true;
|
||||||
@@ -204,102 +32,14 @@
|
|||||||
incsearch = true;
|
incsearch = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
keymaps = [
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>ff";
|
|
||||||
action = "<cmd>Telescope find_files hidden=true<CR>";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>fc";
|
|
||||||
action = "<cmd>Telescope treesitter<CR>";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>t";
|
|
||||||
action = "<cmd>NvimTreeToggle<CR>";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-.>";
|
|
||||||
action = "<cmd>BufferNext<CR>";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-,>";
|
|
||||||
action = "<cmd>BufferPrevious<CR>";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-h>";
|
|
||||||
action = "<cmd>wincmd h<CR>";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-j>";
|
|
||||||
action = "<cmd>wincmd j<CR>";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-k>";
|
|
||||||
action = "<cmd>wincmd k<CR>";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-l>";
|
|
||||||
action = "<cmd>wincmd l<CR>";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "Q";
|
|
||||||
action = "<nop>";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "v";
|
|
||||||
key = "J";
|
|
||||||
action = ":m '>+1<CR>gv=gv";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "v";
|
|
||||||
key = "K";
|
|
||||||
action = ":m '<-2<CR>gv=gv";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>y";
|
|
||||||
action = "\"+y";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "v";
|
|
||||||
key = "<leader>y";
|
|
||||||
action = "\"+y";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>s";
|
|
||||||
action = ":%s/\\<<C-r><C-w>\\>/<C-r><C-w>/gI<Left><Left><Left>";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
|
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require('dap').listeners.after.event_initialized['dapui_config'] = require('dapui').open
|
||||||
|
require('dap').listeners.before.event_terminated['dapui_config'] = require('dapui').close
|
||||||
|
require('dap').listeners.before.event_exited['dapui_config'] = require('dapui').close
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
@@ -308,6 +48,8 @@
|
|||||||
llm-nvim
|
llm-nvim
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
|
|
||||||
|
nvim-treesitter-parsers.glsl
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
colorscheme = if opts.pywal then "pywal" else "tokyonight-storm";
|
colorscheme = if opts.pywal then "pywal" else "tokyonight-storm";
|
||||||
|
|||||||
188
config/keymaps.nix
Normal file
188
config/keymaps.nix
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
{ ... }: {
|
||||||
|
|
||||||
|
globals = {
|
||||||
|
mapleader = " ";
|
||||||
|
maplocalleader = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ff";
|
||||||
|
action = "<cmd>Telescope find_files hidden=true<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>fc";
|
||||||
|
action = "<cmd>Telescope treesitter<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>t";
|
||||||
|
action = "<cmd>NvimTreeToggle<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>.";
|
||||||
|
action = "<cmd>BufferNext<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>,";
|
||||||
|
action = "<cmd>BufferPrevious<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-h>";
|
||||||
|
action = "<cmd>wincmd h<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-j>";
|
||||||
|
action = "<cmd>wincmd j<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-k>";
|
||||||
|
action = "<cmd>wincmd k<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-l>";
|
||||||
|
action = "<cmd>wincmd l<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "Q";
|
||||||
|
action = "<nop>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
key = "J";
|
||||||
|
action = ":m '>+1<CR>gv=gv";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
key = "K";
|
||||||
|
action = ":m '<-2<CR>gv=gv";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>y";
|
||||||
|
action = "\"+y";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
key = "<leader>y";
|
||||||
|
action = "\"+y";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>s";
|
||||||
|
action = ":%s/\\<<C-r><C-w>\\>/<C-r><C-w>/gI<Left><Left><Left>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<F5>";
|
||||||
|
action.__raw = ''
|
||||||
|
function()
|
||||||
|
require('dap').continue()
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
options = {
|
||||||
|
desc = "Debug: Start/Continue";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<F1>";
|
||||||
|
action.__raw = ''
|
||||||
|
function()
|
||||||
|
require('dap').step_into()
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
options = {
|
||||||
|
desc = "Debug: Step Into";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<F2>";
|
||||||
|
action.__raw = ''
|
||||||
|
function()
|
||||||
|
require('dap').step_over()
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
options = {
|
||||||
|
desc = "Debug: Step Over";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<F3>";
|
||||||
|
action.__raw = ''
|
||||||
|
function()
|
||||||
|
require('dap').step_out()
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
options = {
|
||||||
|
desc = "Debug: Step Out";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>b";
|
||||||
|
action.__raw = ''
|
||||||
|
function()
|
||||||
|
require('dap').toggle_breakpoint()
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
options = {
|
||||||
|
desc = "Debug: Toggle Breakpoint";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>B";
|
||||||
|
action.__raw = ''
|
||||||
|
function()
|
||||||
|
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
options = {
|
||||||
|
desc = "Debug: Set Breakpoint";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
# Toggle to see last session result. Without this, you can't see session output
|
||||||
|
# in case of unhandled exception.
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<F7>";
|
||||||
|
action.__raw = ''
|
||||||
|
function()
|
||||||
|
require('dapui').toggle()
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
options = {
|
||||||
|
desc = "Debug: See last session result.";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
144
config/lsp.nix
Normal file
144
config/lsp.nix
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
{ ... }: {
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
lsp = {
|
||||||
|
enable = true;
|
||||||
|
servers = {
|
||||||
|
#hyprlang
|
||||||
|
hyprls.enable = true;
|
||||||
|
#html
|
||||||
|
html.enable = true;
|
||||||
|
#js/typescript
|
||||||
|
ts_ls.enable = true;
|
||||||
|
#css
|
||||||
|
cssls.enable = true;
|
||||||
|
#c/c++
|
||||||
|
ccls.enable = true;
|
||||||
|
#nix
|
||||||
|
nil_ls.enable = true;
|
||||||
|
#python
|
||||||
|
pyright.enable = true;
|
||||||
|
#bash
|
||||||
|
bashls.enable = true;
|
||||||
|
#glsl
|
||||||
|
glsl_analyzer.enable = true;
|
||||||
|
#qml
|
||||||
|
qmlls.enable = true;
|
||||||
|
#ai
|
||||||
|
/*lsp_ai = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
memory.file_store = {};
|
||||||
|
models = {
|
||||||
|
model1 = {
|
||||||
|
type = "ollama";
|
||||||
|
model = "llama3.2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
chat = {};
|
||||||
|
};
|
||||||
|
};*/
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = {
|
||||||
|
# Diagnostic keymaps
|
||||||
|
diagnostic = {
|
||||||
|
"<leader>q" = {
|
||||||
|
#mode = "n";
|
||||||
|
action = "setloclist";
|
||||||
|
desc = "Open diagnostic [Q]uickfix list";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
extra = [
|
||||||
|
# Jump to the definition of the word under your cusor.
|
||||||
|
# This is where a variable was first declared, or where a function is defined, etc.
|
||||||
|
# To jump back, press <C-t>.
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "gd";
|
||||||
|
action.__raw = "require('telescope.builtin').lsp_definitions";
|
||||||
|
options = {
|
||||||
|
desc = "LSP: [G]oto [D]efinition";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
# Find references for the word under your cursor.
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "gr";
|
||||||
|
action.__raw = "require('telescope.builtin').lsp_references";
|
||||||
|
options = {
|
||||||
|
desc = "LSP: [G]oto [R]eferences";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
# Jump to the implementation of the word under your cursor.
|
||||||
|
# Useful when your language has ways of declaring types without an actual implementation.
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "gI";
|
||||||
|
action.__raw = "require('telescope.builtin').lsp_implementations";
|
||||||
|
options = {
|
||||||
|
desc = "LSP: [G]oto [I]mplementation";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
# Jump to the type of the word under your cursor.
|
||||||
|
# Useful when you're not sure what type a variable is and you want to see
|
||||||
|
# the definition of its *type*, not where it was *defined*.
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>D";
|
||||||
|
action.__raw = "require('telescope.builtin').lsp_type_definitions";
|
||||||
|
options = {
|
||||||
|
desc = "LSP: Type [D]efinition";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
# Fuzzy find all the symbols in your current document.
|
||||||
|
# Symbols are things like variables, functions, types, etc.
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ds";
|
||||||
|
action.__raw = "require('telescope.builtin').lsp_document_symbols";
|
||||||
|
options = {
|
||||||
|
desc = "LSP: [D]ocument [S]ymbols";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
# Fuzzy find all the symbols in your current workspace.
|
||||||
|
# Similar to document symbols, except searches over your entire project.
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ws";
|
||||||
|
action.__raw = "require('telescope.builtin').lsp_dynamic_workspace_symbols";
|
||||||
|
options = {
|
||||||
|
desc = "LSP: [W]orkspace [S]ymbols";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
lspBuf = {
|
||||||
|
# Rename the variable under your cursor.
|
||||||
|
# Most Language Servers support renaming across files, etc.
|
||||||
|
"<leader>rn" = {
|
||||||
|
action = "rename";
|
||||||
|
desc = "LSP: [R]e[n]ame";
|
||||||
|
};
|
||||||
|
# Execute a code action, usually your cursor needs to be on top of an error
|
||||||
|
# or a suggestion from your LSP for this to activate.
|
||||||
|
"<leader>ca" = {
|
||||||
|
#mode = "n";
|
||||||
|
action = "code_action";
|
||||||
|
desc = "LSP: [C]ode [A]ction";
|
||||||
|
};
|
||||||
|
# WARN: This is not Goto Definition, this is Goto Declaration.
|
||||||
|
# For example, in C this would take you to the header.
|
||||||
|
"gD" = {
|
||||||
|
action = "declaration";
|
||||||
|
desc = "LSP: [G]oto [D]eclaration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
38
config/plugins.nix
Normal file
38
config/plugins.nix
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
|
||||||
|
lualine.enable = true;
|
||||||
|
|
||||||
|
luasnip.enable = true;
|
||||||
|
|
||||||
|
barbar.enable = true;
|
||||||
|
|
||||||
|
nvim-tree.enable = true;
|
||||||
|
|
||||||
|
noice.enable = true;
|
||||||
|
|
||||||
|
mini.enable = true;
|
||||||
|
|
||||||
|
notify.enable = true;
|
||||||
|
|
||||||
|
telescope.enable = true;
|
||||||
|
|
||||||
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
highlight.enable = true;
|
||||||
|
grammarPackages = pkgs.vimPlugins.nvim-treesitter.passthru.allGrammars ++ [
|
||||||
|
pkgs.vimPlugins.nvim-treesitter-parsers.glsl
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
render-markdown.enable = true;
|
||||||
|
|
||||||
|
web-devicons.enable = true;
|
||||||
|
|
||||||
|
bufferline.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
68
flake.lock
generated
68
flake.lock
generated
@@ -5,11 +5,11 @@
|
|||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741352980,
|
"lastModified": 1754487366,
|
||||||
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
|
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
|
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -26,11 +26,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738453229,
|
"lastModified": 1754487366,
|
||||||
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
|
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
|
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -71,27 +71,27 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729958008,
|
"lastModified": 1754860581,
|
||||||
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
|
"narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=",
|
||||||
"owner": "NuschtOS",
|
"owner": "NuschtOS",
|
||||||
"repo": "ixx",
|
"repo": "ixx",
|
||||||
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
|
"rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NuschtOS",
|
"owner": "NuschtOS",
|
||||||
"ref": "v0.0.6",
|
"ref": "v0.1.1",
|
||||||
"repo": "ixx",
|
"repo": "ixx",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742069588,
|
"lastModified": 1755615617,
|
||||||
"narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=",
|
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5",
|
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -103,11 +103,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740877520,
|
"lastModified": 1753579242,
|
||||||
"narHash": "sha256-oiwv/ZK/2FhGxrCkQkB83i7GnWXPPLzoqFHpDD3uYpk=",
|
"narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "147dee35aab2193b174e4c0868bd80ead5ce755c",
|
"rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -118,11 +118,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738797219,
|
"lastModified": 1755577059,
|
||||||
"narHash": "sha256-KRwX9Z1XavpgeSDVM/THdFd6uH8rNm/6R+7kIbGa+2s=",
|
"narHash": "sha256-5hYhxIpco8xR+IpP3uU56+4+Bw7mf7EMyxS/HqUYHQY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1da52dd49a127ad74486b135898da2cef8c62665",
|
"rev": "97eb7ee0da337d385ab015a23e15022c865be75c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -136,14 +136,15 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_2",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nuschtosSearch": "nuschtosSearch"
|
"nuschtosSearch": "nuschtosSearch",
|
||||||
|
"systems": "systems_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741814789,
|
"lastModified": 1755741137,
|
||||||
"narHash": "sha256-NbHsnnNwiYUcUaS4z8XK2tYpo3G8NXEKxaKkzMgMiLk=",
|
"narHash": "sha256-YnpE/fOL3H8cJZ9by/YmeNhIqOQdKuZRYA1L3+w6WsI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "33097dcf776d1fad0ff3842096c4e3546312f251",
|
"rev": "91a38e66240c338e683421a4ee3f525d329fc4ad",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -162,11 +163,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738508923,
|
"lastModified": 1755555503,
|
||||||
"narHash": "sha256-4DaDrQDAIxlWhTjH6h/+xfG05jt3qDZrZE/7zDLQaS4=",
|
"narHash": "sha256-WiOO7GUOsJ4/DoMy2IC5InnqRDSo2U11la48vCCIjjY=",
|
||||||
"owner": "NuschtOS",
|
"owner": "NuschtOS",
|
||||||
"repo": "search",
|
"repo": "search",
|
||||||
"rev": "86e2038290859006e05ca7201425ea5b5de4aecb",
|
"rev": "6f3efef888b92e6520f10eae15b86ff537e1d2ea",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -196,6 +197,21 @@
|
|||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
Reference in New Issue
Block a user