removed pluginsbak
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
{
|
||||
programs.nixvim.plugins.barbar = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
next.key = "<TAB>";
|
||||
previous.key = "<S-TAB>";
|
||||
close.key = "<C-w>";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{config, ...}: {
|
||||
programs.nixvim.plugins.chatgpt = {
|
||||
enable = true;
|
||||
settings = {
|
||||
api_key_cmd = "cat ${config.sops.secrets.openai_api_key.path}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
programs.nixvim.plugins.comment = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
opleader.line = "<C-b>";
|
||||
toggler.line = "<C-b>";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
programs.nixvim.plugins.conform-nvim = {
|
||||
enable = true;
|
||||
formatOnSave = {
|
||||
lspFallback = true;
|
||||
timeoutMs = 500;
|
||||
};
|
||||
notifyOnError = true;
|
||||
formattersByFt = {
|
||||
liquidsoap = [ "liquidsoap-prettier" ];
|
||||
html = [ [ "prettierd" "prettier" ] ];
|
||||
css = [ [ "prettierd" "prettier" ] ];
|
||||
javascript = [ [ "prettierd" "prettier" ] ];
|
||||
javascriptreact = [ [ "prettierd" "prettier" ] ];
|
||||
typescript = [ [ "prettierd" "prettier" ] ];
|
||||
typescriptreact = [ [ "prettierd" "prettier" ] ];
|
||||
python = [ "black" ];
|
||||
lua = [ "stylua" ];
|
||||
nix = [ "alejandra" ];
|
||||
markdown = [ [ "prettierd" "prettier" ] ];
|
||||
yaml = [ "yamllint" "yamlfmt" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
concatLists,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.modules.devtools.neovim;
|
||||
in {
|
||||
imports = concatLists [
|
||||
mkIf
|
||||
(cfg.barbar.enable or true)
|
||||
[./barbar.nix]
|
||||
mkIf
|
||||
(cfg.chatgpt.enable or true)
|
||||
[./chatgpt.nix]
|
||||
mkIf
|
||||
(cfg.comment.enable or true)
|
||||
[./comment.nix]
|
||||
mkIf
|
||||
(cfg.conform.enable or true)
|
||||
[./conform.nix]
|
||||
mkIf
|
||||
(cfg.efm.enable or true)
|
||||
[./efm.nix]
|
||||
mkIf
|
||||
(cfg.lsp.enable or true)
|
||||
[./lsp.nix]
|
||||
mkIf
|
||||
(cfg.lualine.enable or true)
|
||||
[./lualine.nix]
|
||||
mkIf
|
||||
(cfg.markdown-preview.enable or true)
|
||||
[./markdown-preview.nix]
|
||||
mkIf
|
||||
(cfg.neo-tree.enable or true)
|
||||
[./neo-tree.nix]
|
||||
mkIf
|
||||
(cfg.nonels.enable or true)
|
||||
[./nonels.nix]
|
||||
mkIf
|
||||
(cfg.startify.enable or true)
|
||||
[./startify.nix]
|
||||
mkIf
|
||||
(cfg.tagbar.enable or true)
|
||||
[./tagbar.nix]
|
||||
mkIf
|
||||
(cfg.telescope.enable or true)
|
||||
[./telescope.nix]
|
||||
mkIf
|
||||
(cfg.treesitter.enable or true)
|
||||
[./treesitter.nix]
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
extraPlugins = [pkgs.vimPlugins.gruvbox-material];
|
||||
colorscheme = "gruvbox-material";
|
||||
|
||||
plugins = {
|
||||
gitsigns = {
|
||||
enable = true;
|
||||
settings.signs = {
|
||||
add.text = "+";
|
||||
change.text = "~";
|
||||
};
|
||||
};
|
||||
|
||||
nvim-autopairs.enable = true;
|
||||
|
||||
nvim-colorizer = {
|
||||
enable = true;
|
||||
userDefaultOptions.names = false;
|
||||
};
|
||||
|
||||
oil.enable = true;
|
||||
|
||||
trim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
highlight = false;
|
||||
ft_blocklist = [
|
||||
"checkhealth"
|
||||
"floaterm"
|
||||
"lspinfo"
|
||||
"neo-tree"
|
||||
"TelescopePrompt"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
lsp.servers.efm = {
|
||||
enable = true;
|
||||
extraOptions.init_options = {
|
||||
documentFormatting = true;
|
||||
documentRangeFormatting = true;
|
||||
hover = true;
|
||||
documentSymbol = true;
|
||||
codeAction = true;
|
||||
completion = true;
|
||||
};
|
||||
};
|
||||
|
||||
lsp-format = {
|
||||
enable = true;
|
||||
lspServersToEnable = ["efm"];
|
||||
};
|
||||
|
||||
efmls-configs.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
programs.nixvim.plugins.floaterm = {
|
||||
enable = true;
|
||||
|
||||
width = 0.8;
|
||||
height = 0.8;
|
||||
|
||||
title = "";
|
||||
|
||||
keymaps.toggle = "<leader>,";
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.harpoon = {
|
||||
enable = true;
|
||||
|
||||
keymapsSilent = true;
|
||||
|
||||
keymaps = {
|
||||
addFile = "<leader>a";
|
||||
toggleQuickMenu = "<C-e>";
|
||||
navFile = {
|
||||
"1" = "<C-j>";
|
||||
"2" = "<C-k>";
|
||||
"3" = "<C-l>";
|
||||
"4" = "<C-m>";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.lsp;
|
||||
in {
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.lsp.enable = mkEnableOption "Enables LSP support for Neovim";
|
||||
|
||||
modules.devtools.neovim.plugins.lsp.servers = {
|
||||
cssls.enable = mkEnableOption "Enable CSS LSP";
|
||||
tailwindcss.enable = mkEnableOption "Enable TailwindCSS LSP";
|
||||
html.enable = mkEnableOption "Enable HTML LSP";
|
||||
astro.enable = mkEnableOption "Enable AstroJS LSP";
|
||||
phpactor.enable = mkEnableOption "Enable PHP LSP";
|
||||
svelte.enable = mkEnableOption "Enable Svelte LSP";
|
||||
vuels.enable = mkEnableOption "Enable Vue LSP";
|
||||
pyright.enable = mkEnableOption "Enable Python LSP";
|
||||
marksman.enable = mkEnableOption "Enable Markdown LSP";
|
||||
nixd.enable = mkEnableOption "Enable Nix LSP";
|
||||
dockerls.enable = mkEnableOption "Enable Docker LSP";
|
||||
bashls.enable = mkEnableOption "Enable Bash LSP";
|
||||
clangd.enable = mkEnableOption "Enable C/C++ LSP";
|
||||
csharp-ls.enable = mkEnableOption "Enable C# LSP";
|
||||
yamlls.enable = mkEnableOption "Enable YAML LSP";
|
||||
lua-ls.enable = mkEnableOption "Enable Lua LSP";
|
||||
tsserver.enable = mkEnableOption "Enable TypeScript/JavaScript LSP";
|
||||
rust-analyzer.enable = mkEnableOption "Enable Rust LSP";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
silent = true;
|
||||
diagnostic = {
|
||||
"<leader>k" = "goto_prev";
|
||||
"<leader>j" = "goto_next";
|
||||
};
|
||||
|
||||
lspBuf = {
|
||||
gd = "definition";
|
||||
gD = "references";
|
||||
gt = "type_definition";
|
||||
gi = "implementation";
|
||||
K = "hover";
|
||||
"<F2>" = "rename";
|
||||
};
|
||||
};
|
||||
|
||||
servers = {
|
||||
cssls = mkIf cfg.servers.cssls.enable {};
|
||||
tailwindcss = mkIf cfg.servers.tailwindcss.enable {};
|
||||
html = mkIf cfg.servers.html.enable {};
|
||||
astro = mkIf cfg.servers.astro.enable {};
|
||||
phpactor = mkIf cfg.servers.phpactor.enable {};
|
||||
svelte = mkIf cfg.servers.svelte.enable {};
|
||||
vuels = mkIf cfg.servers.vuels.enable {};
|
||||
pyright = mkIf cfg.servers.pyright.enable {};
|
||||
marksman = mkIf cfg.servers.marksman.enable {};
|
||||
nixd = mkIf cfg.servers.nixd.enable {};
|
||||
dockerls = mkIf cfg.servers.dockerls.enable {};
|
||||
bashls = mkIf cfg.servers.bashls.enable {};
|
||||
clangd = mkIf cfg.servers.clangd.enable {};
|
||||
csharp-ls = mkIf cfg.servers.csharp-ls.enable {};
|
||||
yamlls = mkIf cfg.servers.yamlls.enable {};
|
||||
lua-ls = mkIf cfg.servers.lua-ls.enable {
|
||||
settings.telemetry.enable = false;
|
||||
settings.diagnostics.globals = ["vim"];
|
||||
};
|
||||
tsserver = mkIf cfg.servers.tsserver.enable {};
|
||||
rust-analyzer = mkIf cfg.servers.rust-analyzer.enable {
|
||||
installRustc = true;
|
||||
installCargo = true;
|
||||
settings = {
|
||||
checkOnSave = true;
|
||||
check.command = "clippy";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
programs.nixvim.plugins.lualine = {
|
||||
enable = true;
|
||||
theme = "gruvbox-material";
|
||||
|
||||
globalstatus = true;
|
||||
|
||||
# +-------------------------------------------------+
|
||||
# | A | B | C X | Y | Z |
|
||||
# +-------------------------------------------------+
|
||||
sections = {
|
||||
lualine_a = ["mode"];
|
||||
lualine_b = ["branch"];
|
||||
lualine_c = ["filename" "diff"];
|
||||
|
||||
lualine_x = [
|
||||
"diagnostics"
|
||||
|
||||
# Show active language server
|
||||
{
|
||||
name.__raw = ''
|
||||
function()
|
||||
local msg = ""
|
||||
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
||||
local clients = vim.lsp.get_active_clients()
|
||||
if next(clients) == nil then
|
||||
return msg
|
||||
end
|
||||
for _, client in ipairs(clients) do
|
||||
local filetypes = client.config.filetypes
|
||||
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||
return client.name
|
||||
end
|
||||
end
|
||||
return msg
|
||||
end
|
||||
'';
|
||||
icon = "";
|
||||
color.fg = "#ffffff";
|
||||
}
|
||||
"encoding"
|
||||
"fileformat"
|
||||
"filetype"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.markdown-preview = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
auto_close = false;
|
||||
theme = "dark";
|
||||
};
|
||||
};
|
||||
|
||||
files."after/ftplugin/markdown.lua".keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>m";
|
||||
action = ":MarkdownPreview<cr>";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>n";
|
||||
action = ":Neotree action=focus reveal toggle<CR>";
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
|
||||
closeIfLastWindow = true;
|
||||
window = {
|
||||
width = 30;
|
||||
autoExpandWidth = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
programs.nixvim.plugins.none-ls = {
|
||||
enable = true;
|
||||
settings = {
|
||||
cmd = ["bash -c nvim"];
|
||||
debug = true;
|
||||
};
|
||||
sources = {
|
||||
code_actions = {
|
||||
statix.enable = true;
|
||||
gitsigns.enable = true;
|
||||
};
|
||||
diagnostics = {
|
||||
statix.enable = true;
|
||||
deadnix.enable = true;
|
||||
pylint.enable = true;
|
||||
checkstyle.enable = true;
|
||||
};
|
||||
formatting = {
|
||||
alejandra.enable = true;
|
||||
stylua.enable = true;
|
||||
shfmt.enable = true;
|
||||
nixpkgs_fmt.enable = true;
|
||||
google_java_format.enable = false;
|
||||
prettier = {
|
||||
enable = true;
|
||||
disableTsServerFormatter = true;
|
||||
};
|
||||
black = {
|
||||
enable = true;
|
||||
settings = ''
|
||||
{
|
||||
extra_args = { "--fast" },
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
completion = {
|
||||
luasnip.enable = true;
|
||||
spell.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
programs.nixvim.plugins.startify = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
custom_header = [
|
||||
""
|
||||
" ███╗ ██╗██╗██╗ ██╗██╗ ██╗██╗███╗ ███╗"
|
||||
" ████╗ ██║██║╚██╗██╔╝██║ ██║██║████╗ ████║"
|
||||
" ██╔██╗ ██║██║ ╚███╔╝ ██║ ██║██║██╔████╔██║"
|
||||
" ██║╚██╗██║██║ ██╔██╗ ╚██╗ ██╔╝██║██║╚██╔╝██║"
|
||||
" ██║ ╚████║██║██╔╝ ██╗ ╚████╔╝ ██║██║ ╚═╝ ██║"
|
||||
" ╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝"
|
||||
];
|
||||
|
||||
# When opening a file or bookmark, change to its directory.
|
||||
change_to_dir = false;
|
||||
|
||||
# By default, the fortune header uses ASCII characters, because they work for everyone.
|
||||
# If you set this option to 1 and your 'encoding' is "utf-8", Unicode box-drawing characters will
|
||||
# be used instead.
|
||||
use_unicode = true;
|
||||
|
||||
lists = [{type = "dir";}];
|
||||
files_number = 30;
|
||||
|
||||
skiplist = [
|
||||
"flake.lock"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.tagbar = {
|
||||
enable = true;
|
||||
settings.width = 50;
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-g>";
|
||||
action = ":TagbarToggle<cr>";
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
# Find files using Telescope command-line sugar.
|
||||
"<leader>ff" = "find_files";
|
||||
"<leader>fg" = "live_grep";
|
||||
"<leader>b" = "buffers";
|
||||
"<leader>fh" = "help_tags";
|
||||
"<leader>fd" = "diagnostics";
|
||||
|
||||
# FZF like bindings
|
||||
"<C-p>" = "git_files";
|
||||
"<leader>p" = "oldfiles";
|
||||
"<C-f>" = "live_grep";
|
||||
};
|
||||
|
||||
settings.defaults = {
|
||||
file_ignore_patterns = [
|
||||
"^.git/"
|
||||
"^.mypy_cache/"
|
||||
"^__pycache__/"
|
||||
"^output/"
|
||||
"^data/"
|
||||
"%.ipynb"
|
||||
];
|
||||
set_env.COLORTERM = "truecolor";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
|
||||
nixvimInjections = true;
|
||||
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
};
|
||||
folding = true;
|
||||
};
|
||||
|
||||
treesitter-refactor = {
|
||||
enable = true;
|
||||
highlightDefinitions = {
|
||||
enable = true;
|
||||
# Set to false if you have an `updatetime` of ~100.
|
||||
clearOnCursorMove = false;
|
||||
};
|
||||
};
|
||||
|
||||
hmts.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.vimtex = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
view_method = "zathura";
|
||||
|
||||
quickfix_enabled = true;
|
||||
quickfix_open_on_warning = false;
|
||||
|
||||
# Ignore undesired errors and warnings
|
||||
quickfix_ignore_filters = [
|
||||
"Underfull"
|
||||
"Overfull"
|
||||
"specifier changed to"
|
||||
"Token not allowed in a PDF string"
|
||||
];
|
||||
|
||||
# TOC settings
|
||||
toc_config = {
|
||||
name = "TOC";
|
||||
layers = ["content" "todo"];
|
||||
resize = true;
|
||||
split_width = 50;
|
||||
todo_sorted = false;
|
||||
show_help = true;
|
||||
show_numbers = true;
|
||||
mode = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
files."after/ftplugin/tex.lua".keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "m";
|
||||
action = ":VimtexView<cr>";
|
||||
}
|
||||
];
|
||||
|
||||
autoCmd = [
|
||||
{
|
||||
event = ["BufEnter" "BufWinEnter"];
|
||||
pattern = "*.tex";
|
||||
command = "set filetype=tex \"| VimtexTocOpen";
|
||||
}
|
||||
|
||||
# Folding
|
||||
{
|
||||
event = "FileType";
|
||||
pattern = ["tex" "latex"];
|
||||
callback.__raw = ''
|
||||
function ()
|
||||
vim.o.foldmethod = 'expr'
|
||||
vim.o.foldexpr = 'vimtex#fold#level(v:lnum)'
|
||||
vim.o.foldtext = 'vimtex#fold#text()'
|
||||
end
|
||||
'';
|
||||
}
|
||||
|
||||
# Compile on initialization
|
||||
{
|
||||
event = "User";
|
||||
pattern = "VimtexEventInitPost";
|
||||
callback = "vimtex#compiler#compile";
|
||||
}
|
||||
|
||||
# Cleanup on exit
|
||||
{
|
||||
event = "User";
|
||||
pattern = "VimtexEventQuit";
|
||||
command = "call vimtex#compiler#clean(0)";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
programs.nixvim.plugins.yanky = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user