more nvim config
This commit is contained in:
parent
3a56012932
commit
3783ec19c6
2 changed files with 62 additions and 11 deletions
|
@ -12,11 +12,15 @@ in with lib; {
|
||||||
|
|
||||||
globals.mapleader = " ";
|
globals.mapleader = " ";
|
||||||
|
|
||||||
options.number = true;
|
options = {
|
||||||
|
number = true;
|
||||||
|
conceallevel = 2;
|
||||||
|
};
|
||||||
|
|
||||||
clipboard.providers.wl-copy.enable = true;
|
clipboard.providers.wl-copy.enable = true;
|
||||||
|
|
||||||
keymaps = [
|
keymaps = [
|
||||||
|
# Telescope
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>ff";
|
key = "<leader>ff";
|
||||||
|
@ -31,8 +35,14 @@ in with lib; {
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>fb";
|
key = "<leader>fb";
|
||||||
action = ":Telescope file_browser<CR>";
|
action = ":Telescope buffers<CR>";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>fo";
|
||||||
|
action = ":Telescope oldfiles<CR>";
|
||||||
|
}
|
||||||
|
# Commenting
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<C-_>";
|
key = "<C-_>";
|
||||||
|
@ -53,6 +63,7 @@ in with lib; {
|
||||||
'';
|
'';
|
||||||
lua = true;
|
lua = true;
|
||||||
}
|
}
|
||||||
|
# Float Term
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "t";
|
key = "t";
|
||||||
|
@ -64,14 +75,15 @@ in with lib; {
|
||||||
action = "function() vim.cmd(':FloatermToggle myfloat') end";
|
action = "function() vim.cmd(':FloatermToggle myfloat') end";
|
||||||
lua = true;
|
lua = true;
|
||||||
}
|
}
|
||||||
|
# Switch buffers
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<C-Tab>";
|
key = "<leader>s";
|
||||||
action = ":bn<CR>";
|
action = ":bn<CR>";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<S-C-Tab>";
|
key = "<leader>a";
|
||||||
action = ":bp<CR>";
|
action = ":bp<CR>";
|
||||||
}
|
}
|
||||||
# Change Indenting
|
# Change Indenting
|
||||||
|
@ -113,7 +125,8 @@ in with lib; {
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>nf";
|
key = "<leader>nf";
|
||||||
lua = true;
|
lua = true;
|
||||||
action = "function() require('neotest').run.run(vim.fn.expand('%')) end";
|
action =
|
||||||
|
"function() require('neotest').run.run(vim.fn.expand('%')) end";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -134,16 +147,51 @@ in with lib; {
|
||||||
nix.enable = true;
|
nix.enable = true;
|
||||||
luasnip.enable = true;
|
luasnip.enable = true;
|
||||||
typst-vim.enable = true;
|
typst-vim.enable = true;
|
||||||
|
obsidian = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
new_notes_location = "notes_subdir";
|
||||||
|
daily_notes = {
|
||||||
|
folder = "daily";
|
||||||
|
};
|
||||||
|
workspaces = [
|
||||||
|
{
|
||||||
|
name = "notes";
|
||||||
|
path = "~/src/notes";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
completion = {
|
||||||
|
min_chars = 2;
|
||||||
|
nvim_cmp = true;
|
||||||
|
};
|
||||||
|
picker.name = "telescope.nvim";
|
||||||
|
note_id_func = ''
|
||||||
|
function(title)
|
||||||
|
-- Create note IDs in a Zettelkasten format with a timestamp and a suffix.
|
||||||
|
-- In this case a note with the title 'My new note' will be given an ID that looks
|
||||||
|
-- like '1657296016-my-new-note', and therefore the file name '1657296016-my-new-note.md'
|
||||||
|
local suffix = ""
|
||||||
|
if title ~= nil then
|
||||||
|
-- If title is given, transform it into valid file name.
|
||||||
|
suffix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
|
||||||
|
else
|
||||||
|
-- If title is nil, just add 4 random uppercase letters to the suffix.
|
||||||
|
for _ = 1, 4 do
|
||||||
|
suffix = suffix .. string.char(math.random(65, 90))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return tostring(os.time()) .. "-" .. suffix
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
fidget = {
|
fidget = {
|
||||||
enable = true;
|
enable = true;
|
||||||
progress = {
|
progress = {
|
||||||
ignoreDoneAlready = true;
|
ignoreDoneAlready = true;
|
||||||
ignore = [ "ltex" ];
|
ignore = [ "ltex" ];
|
||||||
};
|
};
|
||||||
notification = {
|
notification = { overrideVimNotify = true; };
|
||||||
overrideVimNotify = true;
|
|
||||||
# group_seperator = "";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
neotest = {
|
neotest = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -167,15 +215,17 @@ in with lib; {
|
||||||
};
|
};
|
||||||
telescope = {
|
telescope = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
defaults.preview.ls_short = true;
|
||||||
extensions.file_browser = {
|
extensions.file_browser = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hijackNetrw = true;
|
hijackNetrw = true;
|
||||||
|
dirIcon = "";
|
||||||
};
|
};
|
||||||
extensions.fzf-native.enable = true;
|
extensions.fzf-native.enable = true;
|
||||||
extensions.fzf-native.fuzzy = true;
|
extensions.fzf-native.fuzzy = true;
|
||||||
|
extensions.frecency.enable = true;
|
||||||
};
|
};
|
||||||
comment-nvim = { enable = true; };
|
comment-nvim.enable = true;
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
keymaps = {
|
keymaps = {
|
||||||
|
|
|
@ -14,5 +14,6 @@
|
||||||
jetbrains.rust-rover
|
jetbrains.rust-rover
|
||||||
eduvpn-client
|
eduvpn-client
|
||||||
localsend
|
localsend
|
||||||
|
obsidian
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue