some minor config
This commit is contained in:
parent
457537462a
commit
89ce2c97d9
9 changed files with 326 additions and 189 deletions
|
@ -65,6 +65,16 @@ in with lib; {
|
|||
action = "function() vim.cmd(':FloatermToggle myfloat') end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-Tab>";
|
||||
action = ":bn<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-C-Tab>";
|
||||
action = ":bp<CR>";
|
||||
}
|
||||
];
|
||||
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
|
@ -98,12 +108,10 @@ in with lib; {
|
|||
enable = true;
|
||||
sources = {
|
||||
formatting.nixpkgs_fmt.enable = true;
|
||||
code_actions.shellcheck.enable = true;
|
||||
code_actions.statix.enable = true;
|
||||
diagnostics = {
|
||||
statix.enable = true;
|
||||
deadnix.enable = true;
|
||||
shellcheck.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -147,43 +155,43 @@ in with lib; {
|
|||
|
||||
floaterm.enable = true;
|
||||
|
||||
nvim-cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{
|
||||
name = "luasnip";
|
||||
option = { show_autosnippets = true; };
|
||||
}
|
||||
{ name = "cmp-spell"; }
|
||||
{ name = "cmp-rg"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
];
|
||||
snippet.expand = "luasnip";
|
||||
mappingPresets = [ "insert" "cmdline" ];
|
||||
mapping = {
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<Tab>" = {
|
||||
modes = [ "i" "s" ];
|
||||
action = ''
|
||||
function(fallback)
|
||||
local luasnip = require('luasnip')
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
# cmp = {
|
||||
# enable = true;
|
||||
# autoEnableSources = true;
|
||||
# extraOptions.sources = [
|
||||
# { name = "nvim_lsp"; }
|
||||
# {
|
||||
# name = "luasnip";
|
||||
# option = { show_autosnippets = true; };
|
||||
# }
|
||||
# { name = "cmp-spell"; }
|
||||
# { name = "cmp-rg"; }
|
||||
# { name = "path"; }
|
||||
# { name = "buffer"; }
|
||||
# ];
|
||||
# extraOptions.snippet.expand = "luasnip";
|
||||
# # mappingPresets = [ "insert" "cmdline" ];
|
||||
# extraOptions.mapping = {
|
||||
# "<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
# "<Tab>" = {
|
||||
# modes = [ "i" "s" ];
|
||||
# action = ''
|
||||
# function(fallback)
|
||||
# local luasnip = require('luasnip')
|
||||
# if cmp.visible() then
|
||||
# cmp.select_next_item()
|
||||
# elseif luasnip.expandable() then
|
||||
# luasnip.expand()
|
||||
# elseif luasnip.expand_or_jumpable() then
|
||||
# luasnip.expand_or_jump()
|
||||
# else
|
||||
# fallback()
|
||||
# end
|
||||
# end
|
||||
# '';
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
{ config, pkgs, lib, inputs, ... }: {
|
||||
imports = [ ./laura.nix ./vivian.nix ./jonathan.nix ];
|
||||
programs = {
|
||||
|
||||
|
@ -14,6 +14,9 @@
|
|||
source "${pkgs.fzf}/share/fzf/key-bindings.zsh"
|
||||
source "${pkgs.fzf}/share/fzf/completion.zsh"
|
||||
eval "$(${pkgs.zoxide}/bin/zoxide init zsh)"
|
||||
|
||||
export TEMPDIRS="$HOME/tmp"
|
||||
source "${inputs.t.packages.${pkgs.system}.default}/bin/t-rs.sh"
|
||||
'';
|
||||
# otherwise it'll override the grml prompt
|
||||
promptInit = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue