Compare commits

..

12 Commits

10 changed files with 40 additions and 94 deletions

View File

@ -66,13 +66,7 @@
} }
]; ];
}; };
networkmanager = { networkmanager.enable = true;
enable = true;
dns = "none";
};
dhcpcd.extraConfig = ''
nohook resolv.conf
'';
}; };
hardware.nvidia.modesetting.enable = true; hardware.nvidia.modesetting.enable = true;
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];

View File

@ -106,6 +106,7 @@ in
}; };
services = { services = {
illum.enable = true; illum.enable = true;
resolved.enable = true;
gnome.gnome-keyring.enable = true; gnome.gnome-keyring.enable = true;
pipewire = { pipewire = {
enable = true; enable = true;

View File

@ -38,7 +38,6 @@ in
wallpaper.enable = true; wallpaper.enable = true;
kitty.enable = true; kitty.enable = true;
rofi.enable = true; rofi.enable = true;
}; };
wallpapers.enable = true; wallpapers.enable = true;
services.dunst.enable = true; services.dunst.enable = true;

View File

@ -50,7 +50,7 @@ let
"dir = ${quote plugin}" "dir = ${quote plugin}"
"name = ${quote (getName plugin)}" "name = ${quote (getName plugin)}"
] ]
++ (optional (!lazy) "lazy = ${boolToString lazy}") ++ (optional (lazy != null) "lazy = ${boolToString lazy}")
++ (optional (!enabled) "enabled = ${boolToString enabled}") ++ (optional (!enabled) "enabled = ${boolToString enabled}")
++ (optional (dependencies != [ ]) "dependencies = ${listToStringMultiLine id (map lazySpecFromPlugin dependencies)}") ++ (optional (dependencies != [ ]) "dependencies = ${listToStringMultiLine id (map lazySpecFromPlugin dependencies)}")
++ (optional (init != null) "init = function(plugin)\n${toString init}\nend") ++ (optional (init != null) "init = function(plugin)\n${toString init}\nend")
@ -59,7 +59,7 @@ let
++ (optional (event != [ ]) "event = ${listToStringOneLine quote event}") ++ (optional (event != [ ]) "event = ${listToStringOneLine quote event}")
++ (optional (cmd != [ ]) "cmd = ${listToStringOneLine quote cmd}") ++ (optional (cmd != [ ]) "cmd = ${listToStringOneLine quote cmd}")
++ (optional (ft != [ ]) "ft = ${listToStringOneLine quote ft}") ++ (optional (ft != [ ]) "ft = ${listToStringOneLine quote ft}")
++ (optional (priority != 50) "priority = ${toString priority}") ++ (optional (priority != null) "priority = ${toString priority}")
); );
lazySpecs = listToStringMultiLine id (map lazySpecFromPlugin cfg.plugins); lazySpecs = listToStringMultiLine id (map lazySpecFromPlugin cfg.plugins);
lazy = '' lazy = ''
@ -86,7 +86,7 @@ in
type = nullOr str; type = nullOr str;
default = null; default = null;
description = '' description = ''
Lua code to be executed when the plugin is loaded. Lua function to be executed when the plugin is loaded.
''; '';
}; };
dependencies = mkOption { dependencies = mkOption {
@ -111,8 +111,8 @@ in
''; '';
}; };
lazy = mkOption { lazy = mkOption {
type = bool; type = nullOr bool;
default = true; default = null;
description = '' description = ''
Whether to load the plugin lazily. Whether to load the plugin lazily.
''; '';
@ -145,8 +145,8 @@ in
''; '';
}; };
priority = mkOption { priority = mkOption {
type = int; type = nullOr int;
default = 50; default = null;
description = '' description = ''
Priority to load the plugin. Priority to load the plugin.
''; '';

View File

@ -31,7 +31,6 @@ with builtins;
{ plugin = nvim-web-devicons; } { plugin = nvim-web-devicons; }
]; ];
} }
{ plugin = nvim-ts-context-commentstring; }
{ {
plugin = mini-nvim; plugin = mini-nvim;
lazy = false; lazy = false;
@ -180,6 +179,7 @@ with builtins;
{ {
plugin = telescope-nvim; plugin = telescope-nvim;
cmd = [ "Telescope" ]; cmd = [ "Telescope" ];
conf = builtins.readFile ./telescope.lua;
keys = [ keys = [
{ key = "<leader>ff"; cmd = "<cmd>Telescope find_files<cr>"; desc = "Find files"; } { key = "<leader>ff"; cmd = "<cmd>Telescope find_files<cr>"; desc = "Find files"; }
{ key = "<leader>fb"; cmd = "<cmd>Telescope buffers<cr>"; desc = "Find buffers"; } { key = "<leader>fb"; cmd = "<cmd>Telescope buffers<cr>"; desc = "Find buffers"; }
@ -199,13 +199,7 @@ with builtins;
dependencies = [ dependencies = [
{ plugin = plenary-nvim; } { plugin = plenary-nvim; }
{ plugin = which-key-nvim; } { plugin = which-key-nvim; }
]; { plugin = telescope-fzf-native-nvim; }
}
{
plugin = telescope-fzf-native-nvim;
conf = readFile ./telescope-fzf-native-nvim.lua;
dependencies = [
{ plugin = telescope-nvim; }
]; ];
} }
{ {
@ -224,25 +218,6 @@ with builtins;
require("Comment").setup() require("Comment").setup()
''; '';
} }
{
plugin = leap-nvim;
lazy = false;
conf = ''
require("leap").add_default_mappings()
'';
}
{
plugin = leap-spooky-nvim;
lazy = false;
conf = ''
require("leap-spooky").setup()
'';
dependencies = [
{
plugin = leap-nvim;
}
];
}
{ {
plugin = telekasten-nvim; plugin = telekasten-nvim;
dependencies = [ dependencies = [
@ -261,7 +236,7 @@ with builtins;
} }
{ {
plugin = coq_nvim; plugin = coq_nvim;
lazy = false; event = [ "BufReadPost" "BufNewFile" ];
init = builtins.readFile ./coq-nvim.lua; init = builtins.readFile ./coq-nvim.lua;
dependencies = [ dependencies = [
{ {
@ -279,5 +254,19 @@ with builtins;
} }
]; ];
} }
{
plugin = nvim-surround;
event = [ "BufReadPost" "BufNewFile" ];
conf = ''
require("nvim-surround").setup({})
'';
}
{
plugin = nvim-treesitter-context;
event = [ "BufReadPost" "BufNewFile" ];
conf = ''
require("treesitter-context").setup({})
'';
}
]; ];
} }

View File

@ -6,6 +6,9 @@ require("formatter").setup({
log_level = vim.log.levels.WARN, log_level = vim.log.levels.WARN,
-- All formatter configurations are opt-in -- All formatter configurations are opt-in
filetype = { filetype = {
go = {
require("formatter.filetypes.go").gofmt,
},
json = { json = {
require("formatter.filetypes.json").jq, require("formatter.filetypes.json").jq,
}, },

View File

@ -3,55 +3,6 @@ require("mini.move").setup()
require("mini.pairs").setup() require("mini.pairs").setup()
require("mini.starter").setup() require("mini.starter").setup()
require("mini.surround").setup({
-- Add custom surroundings to be used on top of builtin ones. For more
-- information with examples, see `:h MiniSurround.config`.
custom_surroundings = nil,
-- Duration (in ms) of highlight when calling `MiniSurround.highlight()`
highlight_duration = 500,
-- Module mappings. Use `''` (empty string) to disable one.
mappings = {
add = "gSa", -- Add surrounding in Normal and Visual modes
delete = "gSd", -- Delete surrounding
find = "gSf", -- Find surrounding (to the right)
find_left = "gSF", -- Find surrounding (to the left)
highlight = "gSh", -- Highlight surrounding
replace = "gSr", -- Replace surrounding
update_n_lines = "gSn", -- Update `n_lines`
suffix_last = "l", -- Suffix to search with "prev" method
suffix_next = "n", -- Suffix to search with "next" method
},
-- Number of lines within which surrounding is searched
n_lines = 20,
-- Whether to respect selection type:
-- - Place surroundings on separate lines in linewise mode.
-- - Place surroundings on each line in blockwise mode.
respect_selection_type = false,
-- How to search for surrounding (first inside current line, then inside
-- neighborhood). One of 'cover', 'cover_or_next', 'cover_or_prev',
-- 'cover_or_nearest', 'next', 'prev', 'nearest'. For more details,
-- see `:h MiniSurround.config`.
search_method = "cover",
-- Whether to disable showing non-error feedback
silent = false,
})
require("mini.tabline").setup()
local tabline_current = vim.api.nvim_get_hl(0, { name = "MiniTablineCurrent" })
vim.api.nvim_set_hl(0, "MiniTablineCurrent", {
fg = tabline_current.fg,
bg = tabline_current.bg,
bold = true,
italic = true,
})
require("mini.statusline").setup({ require("mini.statusline").setup({
content = { content = {
active = function() active = function()

View File

@ -122,13 +122,23 @@ local servers = {
"nil_ls", "nil_ls",
"pylsp", "pylsp",
"ruff_lsp", "ruff_lsp",
"rust_analyzer",
"typst_lsp", "typst_lsp",
"gopls",
} }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
lspconfig_setup(lsp, {}) lspconfig_setup(lsp, {})
end end
lspconfig_setup("rust_analyzer", {
settings = {
["rust-analyzer"] = {
checkOnSave = {
command = "clippy",
},
},
},
})
lspconfig_setup("lua_ls", { lspconfig_setup("lua_ls", {
settings = { settings = {
Lua = { Lua = {

View File

@ -25,5 +25,4 @@ final: prev:
echo "$selected" echo "$selected"
''; '';
}; };
} }