Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving config #30

Merged
merged 4 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
./languages/treesitter/ts-context-commentstring.nix

./lsp/conform.nix
./lsp/fidget.nix
./lsp/lsp.nix
./lsp/trouble.nix

Expand Down
6 changes: 6 additions & 0 deletions config/keymaps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
action = "+code";
}

{
mode = [ "n" "v" ];
key = "<leader>t";
action = "+test";
}

# Tabs
{
mode = "n";
Expand Down
11 changes: 4 additions & 7 deletions config/languages/typescript-tools-nvim.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{ pkgs, ... }: {
extraPlugins = with pkgs.vimPlugins; [
typescript-tools-nvim
];
extraConfigLua = ''
require("typescript-tools").setup {}
'';
{
plugins.typescript-tools = {
enable = true;
};

keymaps = [
{
Expand Down
12 changes: 12 additions & 0 deletions config/lsp/fidget.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
plugins.fidget = {
enable = false;
notification = {
window = {
winblend = 0;
relative = "editor";
border = "rounded"; # none, single, double, rounded, solid, shadow
};
};
};
}
15 changes: 15 additions & 0 deletions config/telescope/telescope.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
plugins.telescope = {
enable = true;
extensions = {
undo = {
enable = true;
mappings = {
i = {
"<cr>" = "yank_additions";
"<s-cr>" = "yank_deletions";
"<c-cr>" = "restore";
};
n = {
"y" = "yank_additions";
"Y" = "yank_deletions";
"u" = "restore";
};
};
};
fzf-native.enable = true;
};
keymaps = {
Expand Down
9 changes: 9 additions & 0 deletions config/ui/noice.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
plugins.noice = {
enable = true;
lsp = {
message = {
enabled = true;
};
progress = {
enabled = true;
view = "mini";
};
};
popupmenu = {
enabled = true;
backend = "nui";
Expand Down
23 changes: 23 additions & 0 deletions config/ui/nvim-notify.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,27 @@
};
}
];
extraConfigLua = ''
local notify = require("notify")

local filtered_message = { "No information available" }

-- Override notify function to filter out messages
---@diagnostic disable-next-line: duplicate-set-field
vim.notify = function(message, level, opts)
local merged_opts = vim.tbl_extend("force", {
on_open = function(win)
local buf = vim.api.nvim_win_get_buf(win)
vim.api.nvim_buf_set_option(buf, "filetype", "markdown")
end,
}, opts or {})

for _, msg in ipairs(filtered_message) do
if message == msg then
return
end
end
return notify(message, level, merged_opts)
end
'';
}
Loading