Compare commits

...

4 Commits

Author SHA1 Message Date
Sojus07
3c0a5834b0 kekl 2025-02-18 23:39:33 +01:00
Sojus07
42130edad6 kekl 2025-02-18 23:30:47 +01:00
Sojus07
510f3b41db kekl 2025-02-18 22:13:01 +01:00
Sojus07
2c8b799325 kekl 2025-02-18 22:10:07 +01:00
8 changed files with 86 additions and 69 deletions

View File

@ -14,10 +14,10 @@
home-manager, home-manager,
nvf, nvf,
}: { }: {
nixosConfigurations.computer = nixpkgs.lib.nixosSystem { nixosConfigurations.sputnik = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./hosts/computer/configuration.nix ./hosts/sputnik/configuration.nix
nvf.nixosModules.default nvf.nixosModules.default
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
@ -30,10 +30,10 @@
]; ];
}; };
nixosConfigurations.laptop = nixpkgs.lib.nixosSystem { nixosConfigurations.meteor = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./hosts/laptop/configuration.nix ./hosts/meteor/configuration.nix
nvf.nixosModules.default nvf.nixosModules.default
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {

View File

@ -72,6 +72,7 @@
}; };
}; };
lsp = { lsp = {
lspkind.enable = true;
trouble = { trouble = {
enable = true; enable = true;
}; };

View File

@ -1,59 +1,77 @@
local cmp = require("cmp") local cmp = require("cmp")
local lspkind = require("lspkind")
vim.opt.completeopt = { "menu", "menuone", "noinsert", "noselect" } vim.opt.completeopt = { "menu", "menuone", "noinsert", "noselect" }
cmp.setup({ cmp.setup({
snippet = { formatting = {
expand = function(args) format = function(entry, vim_item)
require('luasnip').lsp_expand(args.body) vim_item.menu = ({
end, nvim_lsp = "[LSP]",
}, buffer = "[BUF]",
sorting = { path = "[PATH]",
comparators = { luasnip = "[SNIP]",
cmp.config.compare.offset, nvim_lua = "[LUA]",
cmp.config.compare.exact, })[entry.source.name]
cmp.config.compare.recently_used,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,
cmp.config.compare.order,
},
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback) vim_item.kind = lspkind.symbolic(vim_item.kind, { mode = "symbol" })
if cmp.visible() then return vim_item
cmp.select_prev_item() end,
else },
fallback() sorting = {
end comparators = {
end, { "i", "s" }), cmp.config.compare.offset,
cmp.config.compare.exact,
["<C-b>"] = cmp.mapping.scroll_docs(-4), cmp.config.compare.recently_used,
["<C-f>"] = cmp.mapping.scroll_docs(4), cmp.config.compare.kind,
["<C-Space>"] = cmp.mapping.complete(), cmp.config.compare.sort_text,
["<C-e>"] = cmp.mapping.abort(), cmp.config.compare.length,
["<C-Left>"] = cmp.mapping.abort(), cmp.config.compare.order,
["<CR>"] = cmp.mapping.confirm({ select = false }),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'buffer' },
{ name = 'path' },
{ name = 'nvim_lua' },
{ name = 'emoji' },
}),
highlight = {
default = "Subtle"
}, },
},
window = {
completion = {
autocomplete = true,
col_offset = -3,
side_padding = 0,
},
completion = cmp.config.window.bordered({
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,CursorLine:PmenuSel,Search:None",
}),
documentation = cmp.config.window.bordered({
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,CursorLine:PmenuSel,Search:None",
}),
},
mapping = cmp.mapping.preset.insert({
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { "i", "s" }),
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<C-Left>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = false }),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'buffer' },
{ name = 'path' },
{ name = 'nvim_lua' },
}),
}) })

View File

@ -1,11 +1,11 @@
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 2
vim.opt.tabstop = 4 vim.opt.tabstop = 2
vim.opt.cursorline = true vim.opt.cursorline = true
vim.opt.cursorcolumn = true vim.opt.cursorcolumn = true
vim.opt.expandtab = true vim.opt.expandtab = true
vim.opt.autoindent = true vim.opt.autoindent = true
vim.opt.smartindent = true vim.opt.smartindent = true
vim.opt.softtabstop = 4 vim.opt.softtabstop = 2
vim.opt.relativenumber = true vim.opt.relativenumber = true
vim.diagnostic.config({ vim.diagnostic.config({

View File

@ -21,7 +21,7 @@
bind t new-window bind t new-window
bind -n M-w previous-window bind -n M-w previous-window
bind -n M-e next-window bind -n M-e next-window
bind r source-file ~/.tmux.conf bind r source-file ~/.config/tmux/tmux.conf
bind -n M-Left select-pane -L bind -n M-Left select-pane -L
bind -n M-Right select-pane -R bind -n M-Right select-pane -R
bind -n M-Up select-pane -U bind -n M-Up select-pane -U

View File

@ -67,7 +67,6 @@
binwalk binwalk
chirp chirp
picocom picocom
pwndbg
minipro minipro
ethtool ethtool
@ -100,12 +99,12 @@
pacman pacman
wf-recorder wf-recorder
qbittorrent qbittorrent
superTuxKart
]; ];
fonts = { fonts = {
fontconfig.enable = true; fontconfig.enable = true;
packages = with pkgs; [ packages = with pkgs; [
terminus-nerdfont
noto-fonts noto-fonts
noto-fonts-emoji noto-fonts-emoji
liberation_ttf liberation_ttf
@ -115,8 +114,9 @@
mplus-outline-fonts.githubRelease mplus-outline-fonts.githubRelease
dina-font dina-font
proggyfonts proggyfonts
pkgs.nerd-fonts._0xproto nerd-fonts._0xproto
pkgs.nerd-fonts.droid-sans-mono nerd-fonts.droid-sans-mono
nerd-fonts.terminess-ttf
]; ];
}; };

View File

@ -9,7 +9,6 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./modules/default.nix
../default/default.nix ../default/default.nix
]; ];
@ -64,6 +63,6 @@
"pacman.conf".source = ../default/raw/pacman.conf; "pacman.conf".source = ../default/raw/pacman.conf;
}; };
system.stateVersion = "unstable"; system.stateVersion = "25.05";
} }

View File

@ -9,7 +9,6 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./modules/default.nix
../default/default.nix ../default/default.nix
]; ];
@ -58,6 +57,6 @@
"pacman.conf".source = ../default/raw/pacman.conf; "pacman.conf".source = ../default/raw/pacman.conf;
}; };
system.stateVersion = "unstable"; system.stateVersion = "25.05";
} }