Compare commits

...

3 commits

6 changed files with 88 additions and 5 deletions

View file

@ -3,5 +3,6 @@
./lsp.nix
./lsp-format.nix
./lspkind.nix
./nvim-metals.nix
];
}

View file

@ -1,4 +1,4 @@
{ ... }:
{ helpers, ... }:
{
plugins.lsp = {
@ -16,9 +16,6 @@
nixd = {
enable = true;
};
metals = {
enable = true;
};
};
inlayHints = true;
keymaps = {
@ -73,4 +70,19 @@
};
};
};
keymaps = [
{
mode = [ "n" ];
key = "<leader>th";
action = helpers.mkRaw ''
function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
end
'';
options = {
desc = "Toggle inlay hints";
};
}
];
}

View file

@ -0,0 +1,41 @@
{ pkgs, helpers, ... }:
{
extraPlugins = [
pkgs.vimPlugins.nvim-metals
pkgs.vimPlugins.plenary-nvim
];
extraPackages = [
pkgs.metals
];
autoGroups.nvim_metals_group = {
clear = true;
};
autoCmd = [
{
event = "FileType";
group = "nvim_metals_group";
desc = "Initialize nvim-metals";
callback = helpers.mkRaw ''
function()
metals_config = require("metals").bare_config()
metals_config.init_options.statusBarProvider = "off"
metals_config.settings = {
showInferredType = true,
showImplicitArguments = false,
showImplicitConversionsAndClasses = false,
metalsBinaryPath = "${pkgs.lib.getExe pkgs.metals}",
useGlobalExecutable = true
}
vim.lsp.inlay_hint.enable(true)
require("metals").initialize_or_attach(metals_config)
end
'';
}
];
plugins.fidget.enable = true;
}

View file

@ -25,7 +25,6 @@
end
end
'';
window.mappings."s" = "";
window.mappings."<space>" = "";
};
keymaps = [

View file

@ -1,6 +1,27 @@
{ helpers, ... }:
{
plugins.project-nvim = {
enable = true;
enableTelescope = true;
silentChdir = false;
scopeChdir = "tab";
};
autoGroups.project_nvim_group = {
clear = true;
};
autoCmd = [
{
event = "VimEnter";
group = "project_nvim_group";
desc = "Startup with project.nvim";
callback = helpers.mkRaw ''
function()
require("telescope").extensions.projects.projects{}
end
'';
}
];
}

View file

@ -17,5 +17,14 @@
desc = "Find files with telescope";
};
}
{
mode = [ "n" "i" ];
key = "<C-S-p>";
action = helpers.mkRaw ''
function()
require("telescope.builtin").help_tags()
end
'';
}
];
}