Compare commits
No commits in common. "d43a0d24dd8a7289b61da271a376e1fb1554be51" and "d26387fa879d99f5b22b7c577b0385680acf0da2" have entirely different histories.
d43a0d24dd
...
d26387fa87
24 changed files with 935 additions and 1163 deletions
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
colorschemes.gruvbox = {
|
||||
enable = true;
|
||||
};
|
||||
colorschemes.gruvbox ={
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,58 +1,59 @@
|
|||
{
|
||||
colorschemes.onedark = {
|
||||
enable = true;
|
||||
};
|
||||
extraConfigLua = ''
|
||||
----------------------------------
|
||||
-- START custom setup for onedark
|
||||
----------------------------------
|
||||
-- https://github.com/navarasu/onedark.nvim
|
||||
require('onedark').setup {
|
||||
-- Main options --
|
||||
style = 'darker', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
|
||||
transparent = true, -- Show/hide background
|
||||
term_colors = true, -- Change terminal color as per the selected theme style
|
||||
ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
|
||||
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
|
||||
colorschemes.onedark = {
|
||||
enable = true;
|
||||
};
|
||||
extraConfigLua = ''
|
||||
----------------------------------
|
||||
-- START custom setup for onedark
|
||||
----------------------------------
|
||||
-- https://github.com/navarasu/onedark.nvim
|
||||
require('onedark').setup {
|
||||
-- Main options --
|
||||
style = 'darker', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
|
||||
transparent = true, -- Show/hide background
|
||||
term_colors = true, -- Change terminal color as per the selected theme style
|
||||
ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
|
||||
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
|
||||
|
||||
-- toggle theme style ---
|
||||
-- toggle_style_key = nil, -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "<leader>ts"
|
||||
toggle_style_key = "<leader>ts", -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "<leader>ts"
|
||||
-- toggle_style_list = {'dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light'}, -- List of styles to toggle between
|
||||
toggle_style_list = {'dark', 'darker', 'cool', 'deep', 'warm', 'warmer'}, -- List of styles to toggle between
|
||||
-- toggle theme style ---
|
||||
-- toggle_style_key = nil, -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "<leader>ts"
|
||||
toggle_style_key = "<leader>ts", -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "<leader>ts"
|
||||
-- toggle_style_list = {'dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light'}, -- List of styles to toggle between
|
||||
toggle_style_list = {'dark', 'darker', 'cool', 'deep', 'warm', 'warmer'}, -- List of styles to toggle between
|
||||
|
||||
-- Change code style ---
|
||||
-- Options are italic, bold, underline, none
|
||||
-- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold'
|
||||
code_style = {
|
||||
comments = 'italic',
|
||||
keywords = 'none',
|
||||
functions = 'none',
|
||||
strings = 'none',
|
||||
variables = 'none'
|
||||
},
|
||||
-- Change code style ---
|
||||
-- Options are italic, bold, underline, none
|
||||
-- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold'
|
||||
code_style = {
|
||||
comments = 'italic',
|
||||
keywords = 'none',
|
||||
functions = 'none',
|
||||
strings = 'none',
|
||||
variables = 'none'
|
||||
},
|
||||
|
||||
-- Lualine options --
|
||||
-- lualine = {
|
||||
-- transparent = true, -- lualine center bar transparency
|
||||
-- },
|
||||
-- Lualine options --
|
||||
-- lualine = {
|
||||
-- transparent = true, -- lualine center bar transparency
|
||||
-- },
|
||||
|
||||
-- Custom Highlights --
|
||||
colors = {}, -- Override default colors
|
||||
highlights = {}, -- Override highlight groups
|
||||
-- Custom Highlights --
|
||||
colors = {}, -- Override default colors
|
||||
highlights = {}, -- Override highlight groups
|
||||
|
||||
-- Plugins Config --
|
||||
diagnostics = {
|
||||
darker = true, -- darker colors for diagnostic
|
||||
undercurl = true, -- use undercurl instead of underline for diagnostics
|
||||
background = true, -- use background color for virtual text
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
require('onedark').load()
|
||||
----------------------------------
|
||||
-- END custom setup for onedark
|
||||
----------------------------------
|
||||
'';
|
||||
|
||||
-- Plugins Config --
|
||||
diagnostics = {
|
||||
darker = true, -- darker colors for diagnostic
|
||||
undercurl = true, -- use undercurl instead of underline for diagnostics
|
||||
background = true, -- use background color for virtual text
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
require('onedark').load()
|
||||
----------------------------------
|
||||
-- END custom setup for onedark
|
||||
----------------------------------
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,30 @@
|
|||
# The line beneath this is called `modeline`. See `:help modeline`
|
||||
# vim: ts=4:sts=0:sw=0:tw=78:noet
|
||||
{
|
||||
# Import all your configuration modules here
|
||||
imports = [
|
||||
./colorscheme/onedark.nix
|
||||
# ./colorscheme/gruvbox.nix
|
||||
./colorscheme/onedark.nix
|
||||
# ./colorscheme/gruvbox.nix
|
||||
|
||||
./sets.nix
|
||||
./keymaps.nix
|
||||
./sets.nix
|
||||
./keymaps.nix
|
||||
|
||||
./plugins/bufferline.nix
|
||||
./plugins/comment.nix
|
||||
./plugins/fugitive.nix
|
||||
./plugins/indent-blankline.nix
|
||||
./plugins/leap.nix
|
||||
./plugins/lualine.nix
|
||||
./plugins/nvim-tree.nix
|
||||
./plugins/sleuth.nix
|
||||
./plugins/gitsigns.nix
|
||||
./plugins/which-key.nix
|
||||
./plugins/telescope.nix
|
||||
./plugins/neorg.nix
|
||||
./plugins/treesitter.nix
|
||||
./plugins/bufferline.nix
|
||||
./plugins/comment.nix
|
||||
./plugins/fugitive.nix
|
||||
./plugins/indent-blankline.nix
|
||||
./plugins/leap.nix
|
||||
./plugins/lualine.nix
|
||||
./plugins/nvim-tree.nix
|
||||
./plugins/sleuth.nix
|
||||
./plugins/gitsigns.nix
|
||||
./plugins/which-key.nix
|
||||
./plugins/telescope.nix
|
||||
./plugins/neorg.nix
|
||||
./plugins/treesitter.nix
|
||||
|
||||
./plugins/lsp/lsp.nix
|
||||
./plugins/lsp/lsp.nix
|
||||
|
||||
./plugins/extra/vim-rhubarb.nix
|
||||
./plugins/extra/vim-rhubarb.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,21 @@
|
|||
# The line beneath this is called `modeline`. See `:help modeline`
|
||||
# vim: ts=4:sts=0:sw=0:tw=78:noet
|
||||
{
|
||||
keymaps = [
|
||||
{
|
||||
# vim.keymap.set({ "n", "v" }, "\\y", '"+y', {noremap=true, silent=true})
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "\\y";
|
||||
action = "\"+y";
|
||||
options = {
|
||||
silent = true;
|
||||
remap = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
extraConfigLua = ''
|
||||
-- see ":help default-mapping"
|
||||
-- vim.cmd[[unmap Y]]
|
||||
vim.keymap.del( "n", "Y" )
|
||||
'';
|
||||
keymaps = [
|
||||
{
|
||||
# vim.keymap.set({ "n", "v" }, "\\y", '"+y', {noremap=true, silent=true})
|
||||
mode = [ "n" "v" ];
|
||||
key = "\\y";
|
||||
action = "\"+y";
|
||||
options = {
|
||||
silent = true;
|
||||
remap = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
extraConfigLua = ''
|
||||
-- see ":help default-mapping"
|
||||
-- vim.cmd[[unmap Y]]
|
||||
vim.keymap.del( "n", "Y" )
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
plugins = {
|
||||
bufferline = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
plugins = {
|
||||
bufferline = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
plugins = {
|
||||
comment = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
plugins = {
|
||||
comment = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
extraPlugins = with pkgs.vimPlugins; [ vim-rhubarb ];
|
||||
{ pkgs
|
||||
, ...}:{
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
vim-rhubarb
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
extraPlugins = with pkgs.vimPlugins; [ vim-sleuth ];
|
||||
{ pkgs
|
||||
, ...}:{
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
vim-sleuth
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
plugins = {
|
||||
fugitive = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
plugins = {
|
||||
fugitive = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
plugins = {
|
||||
gitsigns = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
plugins = {
|
||||
gitsigns = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
plugins = {
|
||||
indent-blankline = {
|
||||
enable = true;
|
||||
settings.indent = {
|
||||
char = "▎";
|
||||
tab_char = "┊";
|
||||
};
|
||||
};
|
||||
};
|
||||
plugins = {
|
||||
indent-blankline = {
|
||||
enable = true;
|
||||
settings.indent = {
|
||||
char = "▎";
|
||||
tab_char = "┊";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,46 +1,30 @@
|
|||
{ helpers, ...}:
|
||||
{
|
||||
plugins.leap = {
|
||||
enable = true;
|
||||
addDefaultMappings = false;
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
key = "<leader>ss";
|
||||
action = helpers.mkRaw "function() require('leap').leap {} end";
|
||||
# action = "require('leap').leap";
|
||||
}
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
key = "<leader>sS";
|
||||
action = "<Plug>(leap-backward-to)";
|
||||
}
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
key = "<leader>sx";
|
||||
action = "<Plug>(leap-forward-till)";
|
||||
}
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
key = "<leader>sX";
|
||||
action = "<Plug>(leap-backward-till)";
|
||||
}
|
||||
];
|
||||
plugins.leap = {
|
||||
enable = true;
|
||||
addDefaultMappings = false;
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = [ "n" "x" "o" ];
|
||||
key = "<leader>ss";
|
||||
action = "function() require('leap').leap {} end";
|
||||
lua = true;
|
||||
# action = "require('leap').leap";
|
||||
}
|
||||
{
|
||||
mode = [ "n" "x" "o" ];
|
||||
key = "<leader>sS";
|
||||
action = "<Plug>(leap-backward-to)";
|
||||
}
|
||||
{
|
||||
mode = [ "n" "x" "o" ];
|
||||
key = "<leader>sx";
|
||||
action = "<Plug>(leap-forward-till)";
|
||||
}
|
||||
{
|
||||
mode = [ "n" "x" "o" ];
|
||||
key = "<leader>sX";
|
||||
action = "<Plug>(leap-backward-till)";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
tsserver.enable = true;
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
tsserver.enable = true;
|
||||
|
||||
lua-ls.enable = true;
|
||||
lua-ls.enable = true;
|
||||
|
||||
rust-analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
rust-analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,237 +1,220 @@
|
|||
{
|
||||
plugins = {
|
||||
lsp-format = {
|
||||
enable = false; # Enable it if you want lsp-format integration for none-ls
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
capabilities = "offsetEncoding = 'utf-16'";
|
||||
servers = {
|
||||
texlab = {
|
||||
enable = true;
|
||||
# cmd = ["texlab"];
|
||||
# filetypes = ["tex" "plaintex" "bib"];
|
||||
# extraOptions = {
|
||||
# settings = {
|
||||
# texlab = {
|
||||
# auxDirectory = "tex_aux_output";
|
||||
# rootDirectory = nil;
|
||||
# build = {
|
||||
# # -- forwardSearchAfter = true,
|
||||
# executable = "latexmk";
|
||||
# args = [
|
||||
# "-xelatex"
|
||||
# "-verbose"
|
||||
# # -- "-outdir=%f_output",
|
||||
# # -- "-auxdir=%f_aux",
|
||||
# "-outdir=tex_aux_output"
|
||||
# "-file-line-error"
|
||||
# "-synctex=1"
|
||||
# "-interaction=nonstopmode"
|
||||
# "-pv"
|
||||
# "%f"
|
||||
# ];
|
||||
# isContinuous = false;
|
||||
# # -- "onSave = true" failed to work properly with large files like moderncv
|
||||
# # -- it would not build properly until you delete all the intermediate files
|
||||
# # -- onSave = true
|
||||
# };
|
||||
# # --------------------------------
|
||||
# # -- END texlab main config
|
||||
# # -- if used with texmagic, disable this
|
||||
# # --------------------------------
|
||||
# # --https://github.com/latex-lsp/texlab/wiki/Previewing
|
||||
# # -- https://github.com/f3fora/nvim-texlabconfig
|
||||
# forwardSearch = {
|
||||
# executable = "zathura";
|
||||
# args = [
|
||||
# # -- This is for moving lines in nvim
|
||||
# "--synctex-editor-command"
|
||||
# # -- I don't know why but after switching to lazy.vim, need %%% to escape the % character, so "pgrep zathura -a" can see the % sign
|
||||
# "[[nvim-texlabconfig -file '%%%{input}' -line %%%{line} -server ]] .. vim.v.servername"
|
||||
# "--synctex-forward"
|
||||
# "%l:1:%f"
|
||||
# "%p"
|
||||
# ];
|
||||
# };
|
||||
# diagnosticsDelay = 300;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
clangd = {
|
||||
enable = true;
|
||||
};
|
||||
lua-ls = {
|
||||
enable = true;
|
||||
extraOptions = {
|
||||
settings = {
|
||||
Lua = {
|
||||
completion = {
|
||||
callSnippet = "Replace";
|
||||
};
|
||||
telemetry = {
|
||||
enabled = false;
|
||||
};
|
||||
hint = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
nil-ls = {
|
||||
enable = true;
|
||||
};
|
||||
tsserver = {
|
||||
enable = false;
|
||||
filetypes = [
|
||||
"javascript"
|
||||
"javascriptreact"
|
||||
"typescript"
|
||||
"typescriptreact"
|
||||
];
|
||||
extraOptions = {
|
||||
settings = {
|
||||
javascript = {
|
||||
inlayHints = {
|
||||
includeInlayEnumMemberValueHints = true;
|
||||
includeInlayFunctionLikeReturnTypeHints = true;
|
||||
includeInlayFunctionParameterTypeHints = true;
|
||||
includeInlayParameterNameHints = "all";
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||
includeInlayPropertyDeclarationTypeHints = true;
|
||||
includeInlayVariableTypeHints = true;
|
||||
};
|
||||
};
|
||||
typescript = {
|
||||
inlayHints = {
|
||||
includeInlayEnumMemberValueHints = true;
|
||||
includeInlayFunctionLikeReturnTypeHints = true;
|
||||
includeInlayFunctionParameterTypeHints = true;
|
||||
includeInlayParameterNameHints = "all";
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||
includeInlayPropertyDeclarationTypeHints = true;
|
||||
includeInlayVariableTypeHints = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
eslint = {
|
||||
enable = true;
|
||||
};
|
||||
pyright = {
|
||||
enable = true;
|
||||
};
|
||||
ruff-lsp = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
rust-analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
settings = {
|
||||
checkOnSave = true;
|
||||
check = {
|
||||
command = "clippy";
|
||||
};
|
||||
# inlayHints = {
|
||||
# enable = true;
|
||||
# showParameterNames = true;
|
||||
# parameterHintsPrefix = "<- ";
|
||||
# otherHintsPrefix = "=> ";
|
||||
# };
|
||||
procMacro = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
plugins = {
|
||||
lsp-format = {
|
||||
enable = false; # Enable it if you want lsp-format integration for none-ls
|
||||
};
|
||||
# keymaps = {
|
||||
# silent = true;
|
||||
# lspBuf = {
|
||||
# gd = {
|
||||
# action = "definition";
|
||||
# desc = "Goto Definition";
|
||||
# };
|
||||
# gr = {
|
||||
# action = "references";
|
||||
# desc = "Goto References";
|
||||
# };
|
||||
# gD = {
|
||||
# action = "declaration";
|
||||
# desc = "Goto Declaration";
|
||||
# };
|
||||
# gI = {
|
||||
# action = "implementation";
|
||||
# desc = "Goto Implementation";
|
||||
# };
|
||||
# gT = {
|
||||
# action = "type_definition";
|
||||
# desc = "Type Definition";
|
||||
# };
|
||||
# K = {
|
||||
# action = "hover";
|
||||
# desc = "Hover";
|
||||
# };
|
||||
# "<leader>cw" = {
|
||||
# action = "workspace_symbol";
|
||||
# desc = "Workspace Symbol";
|
||||
# };
|
||||
# "<leader>cr" = {
|
||||
# action = "rename";
|
||||
# desc = "Rename";
|
||||
# };
|
||||
# "<leader>ca" = {
|
||||
# action = "code_action";
|
||||
# desc = "Code Action";
|
||||
# };
|
||||
# "<C-k>" = {
|
||||
# action = "signature_help";
|
||||
# desc = "Signature Help";
|
||||
# };
|
||||
# };
|
||||
# diagnostic = {
|
||||
# "<leader>cd" = {
|
||||
# action = "open_float";
|
||||
# desc = "Line Diagnostics";
|
||||
# };
|
||||
# "[d" = {
|
||||
# action = "goto_next";
|
||||
# desc = "Next Diagnostic";
|
||||
# };
|
||||
# "]d" = {
|
||||
# action = "goto_prev";
|
||||
# desc = "Previous Diagnostic";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
extraConfigLua = ''
|
||||
local _border = "rounded"
|
||||
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
|
||||
vim.lsp.handlers.hover, {
|
||||
border = _border
|
||||
}
|
||||
)
|
||||
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
|
||||
vim.lsp.handlers.signature_help, {
|
||||
border = _border
|
||||
}
|
||||
)
|
||||
|
||||
vim.diagnostic.config{
|
||||
float={border=_border}
|
||||
lsp = {
|
||||
enable = true;
|
||||
capabilities = "offsetEncoding = 'utf-16'";
|
||||
servers = {
|
||||
texlab = {
|
||||
enable = true;
|
||||
# cmd = ["texlab"];
|
||||
# filetypes = ["tex" "plaintex" "bib"];
|
||||
# extraOptions = {
|
||||
# settings = {
|
||||
# texlab = {
|
||||
# auxDirectory = "tex_aux_output";
|
||||
# rootDirectory = nil;
|
||||
# build = {
|
||||
# # -- forwardSearchAfter = true,
|
||||
# executable = "latexmk";
|
||||
# args = [
|
||||
# "-xelatex"
|
||||
# "-verbose"
|
||||
# # -- "-outdir=%f_output",
|
||||
# # -- "-auxdir=%f_aux",
|
||||
# "-outdir=tex_aux_output"
|
||||
# "-file-line-error"
|
||||
# "-synctex=1"
|
||||
# "-interaction=nonstopmode"
|
||||
# "-pv"
|
||||
# "%f"
|
||||
# ];
|
||||
# isContinuous = false;
|
||||
# # -- "onSave = true" failed to work properly with large files like moderncv
|
||||
# # -- it would not build properly until you delete all the intermediate files
|
||||
# # -- onSave = true
|
||||
# };
|
||||
# # --------------------------------
|
||||
# # -- END texlab main config
|
||||
# # -- if used with texmagic, disable this
|
||||
# # --------------------------------
|
||||
# # --https://github.com/latex-lsp/texlab/wiki/Previewing
|
||||
# # -- https://github.com/f3fora/nvim-texlabconfig
|
||||
# forwardSearch = {
|
||||
# executable = "zathura";
|
||||
# args = [
|
||||
# # -- This is for moving lines in nvim
|
||||
# "--synctex-editor-command"
|
||||
# # -- I don't know why but after switching to lazy.vim, need %%% to escape the % character, so "pgrep zathura -a" can see the % sign
|
||||
# "[[nvim-texlabconfig -file '%%%{input}' -line %%%{line} -server ]] .. vim.v.servername"
|
||||
# "--synctex-forward"
|
||||
# "%l:1:%f"
|
||||
# "%p"
|
||||
# ];
|
||||
# };
|
||||
# diagnosticsDelay = 300;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
clangd = {enable = true;};
|
||||
lua-ls = {
|
||||
enable = true;
|
||||
extraOptions = {
|
||||
settings = {
|
||||
Lua = {
|
||||
completion = {
|
||||
callSnippet = "Replace";
|
||||
};
|
||||
telemetry = {
|
||||
enabled = false;
|
||||
};
|
||||
hint = {enable = true;};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
nil_ls = {enable = true;};
|
||||
tsserver = {
|
||||
enable = false;
|
||||
filetypes = ["javascript" "javascriptreact" "typescript" "typescriptreact"];
|
||||
extraOptions = {
|
||||
settings = {
|
||||
javascript = {
|
||||
inlayHints = {
|
||||
includeInlayEnumMemberValueHints = true;
|
||||
includeInlayFunctionLikeReturnTypeHints = true;
|
||||
includeInlayFunctionParameterTypeHints = true;
|
||||
includeInlayParameterNameHints = "all";
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||
includeInlayPropertyDeclarationTypeHints = true;
|
||||
includeInlayVariableTypeHints = true;
|
||||
};
|
||||
};
|
||||
typescript = {
|
||||
inlayHints = {
|
||||
includeInlayEnumMemberValueHints = true;
|
||||
includeInlayFunctionLikeReturnTypeHints = true;
|
||||
includeInlayFunctionParameterTypeHints = true;
|
||||
includeInlayParameterNameHints = "all";
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||
includeInlayPropertyDeclarationTypeHints = true;
|
||||
includeInlayVariableTypeHints = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
eslint = {enable = true;};
|
||||
pyright = {enable = true;};
|
||||
ruff-lsp = {enable = true;};
|
||||
|
||||
require('lspconfig.ui.windows').default_options = {
|
||||
border = _border
|
||||
}
|
||||
rust-analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
settings = {
|
||||
checkOnSave = true;
|
||||
check = {
|
||||
command = "clippy";
|
||||
};
|
||||
# inlayHints = {
|
||||
# enable = true;
|
||||
# showParameterNames = true;
|
||||
# parameterHintsPrefix = "<- ";
|
||||
# otherHintsPrefix = "=> ";
|
||||
# };
|
||||
procMacro = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
# keymaps = {
|
||||
# silent = true;
|
||||
# lspBuf = {
|
||||
# gd = {
|
||||
# action = "definition";
|
||||
# desc = "Goto Definition";
|
||||
# };
|
||||
# gr = {
|
||||
# action = "references";
|
||||
# desc = "Goto References";
|
||||
# };
|
||||
# gD = {
|
||||
# action = "declaration";
|
||||
# desc = "Goto Declaration";
|
||||
# };
|
||||
# gI = {
|
||||
# action = "implementation";
|
||||
# desc = "Goto Implementation";
|
||||
# };
|
||||
# gT = {
|
||||
# action = "type_definition";
|
||||
# desc = "Type Definition";
|
||||
# };
|
||||
# K = {
|
||||
# action = "hover";
|
||||
# desc = "Hover";
|
||||
# };
|
||||
# "<leader>cw" = {
|
||||
# action = "workspace_symbol";
|
||||
# desc = "Workspace Symbol";
|
||||
# };
|
||||
# "<leader>cr" = {
|
||||
# action = "rename";
|
||||
# desc = "Rename";
|
||||
# };
|
||||
# "<leader>ca" = {
|
||||
# action = "code_action";
|
||||
# desc = "Code Action";
|
||||
# };
|
||||
# "<C-k>" = {
|
||||
# action = "signature_help";
|
||||
# desc = "Signature Help";
|
||||
# };
|
||||
# };
|
||||
# diagnostic = {
|
||||
# "<leader>cd" = {
|
||||
# action = "open_float";
|
||||
# desc = "Line Diagnostics";
|
||||
# };
|
||||
# "[d" = {
|
||||
# action = "goto_next";
|
||||
# desc = "Next Diagnostic";
|
||||
# };
|
||||
# "]d" = {
|
||||
# action = "goto_prev";
|
||||
# desc = "Previous Diagnostic";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
extraConfigLua = ''
|
||||
local _border = "rounded"
|
||||
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
|
||||
vim.lsp.handlers.hover, {
|
||||
border = _border
|
||||
}
|
||||
)
|
||||
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
|
||||
vim.lsp.handlers.signature_help, {
|
||||
border = _border
|
||||
}
|
||||
)
|
||||
|
||||
vim.diagnostic.config{
|
||||
float={border=_border}
|
||||
};
|
||||
|
||||
require('lspconfig.ui.windows').default_options = {
|
||||
border = _border
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -241,88 +224,88 @@
|
|||
|
||||
|
||||
|
||||
------------------------------
|
||||
-- START texmagic, texlab
|
||||
------------------------------
|
||||
-- Below this one line is for texmagic only
|
||||
-- vim.g['tex_flavor'] = 'latex'
|
||||
------------------------------
|
||||
-- START texmagic, texlab
|
||||
------------------------------
|
||||
-- Below this one line is for texmagic only
|
||||
-- vim.g['tex_flavor'] = 'latex'
|
||||
|
||||
require('lspconfig').texlab.setup{
|
||||
cmd = {"texlab"},
|
||||
filetypes = {"tex", "plaintex", "bib"},
|
||||
single_file_support = true,
|
||||
settings = {
|
||||
-- https://github.com/latex-lsp/texlab/wiki/Configuration
|
||||
texlab = {
|
||||
----------------------------------
|
||||
-- START for texmagic only
|
||||
----------------------------------
|
||||
-- ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
||||
-- build = _G.TeXMagicBuildConfig,
|
||||
-- ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
||||
----------------------------------
|
||||
-- END for texmagic only
|
||||
----------------------------------
|
||||
require('lspconfig').texlab.setup{
|
||||
cmd = {"texlab"},
|
||||
filetypes = {"tex", "plaintex", "bib"},
|
||||
single_file_support = true,
|
||||
settings = {
|
||||
-- https://github.com/latex-lsp/texlab/wiki/Configuration
|
||||
texlab = {
|
||||
----------------------------------
|
||||
-- START for texmagic only
|
||||
----------------------------------
|
||||
-- ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
||||
-- build = _G.TeXMagicBuildConfig,
|
||||
-- ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
||||
----------------------------------
|
||||
-- END for texmagic only
|
||||
----------------------------------
|
||||
|
||||
--------------------------------
|
||||
-- START texlab main config
|
||||
-- if used with texmagic, disable this
|
||||
--------------------------------
|
||||
auxDirectory = "tex_aux_output",
|
||||
rootDirectory = nil,
|
||||
build = {
|
||||
-- forwardSearchAfter = true,
|
||||
executable = "latexmk",
|
||||
args = {
|
||||
"-xelatex",
|
||||
"-verbose",
|
||||
-- "-outdir=%f_output",
|
||||
-- "-auxdir=%f_aux",
|
||||
"-outdir=tex_aux_output",
|
||||
"-file-line-error",
|
||||
"-synctex=1",
|
||||
"-interaction=nonstopmode",
|
||||
"-pv",
|
||||
"%f",
|
||||
},
|
||||
isContinuous = false,
|
||||
-- "onSave = true" failed to work properly with large files like moderncv
|
||||
-- it would not build properly until you delete all the intermediate files
|
||||
-- onSave = true
|
||||
},
|
||||
--------------------------------
|
||||
-- END texlab main config
|
||||
-- if used with texmagic, disable this
|
||||
--------------------------------
|
||||
--https://github.com/latex-lsp/texlab/wiki/Previewing
|
||||
-- https://github.com/f3fora/nvim-texlabconfig
|
||||
forwardSearch = {
|
||||
executable = "zathura",
|
||||
args = {
|
||||
-- This is for moving lines in nvim
|
||||
'--synctex-editor-command',
|
||||
-- I don't know why but after switching to lazy.vim, need %%% to escape the % character, so "pgrep zathura -a" can see the % sign
|
||||
[[nvim-texlabconfig -file '%%%{input}' -line %%%{line} -server ]] .. vim.v.servername,
|
||||
'--synctex-forward',
|
||||
'%l:1:%f',
|
||||
'%p',
|
||||
},
|
||||
},
|
||||
diagnosticsDelay = 300,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- compile laTeX keymap
|
||||
vim.keymap.set('n', '<leader>l', ':TexlabBuild<CR>' )
|
||||
-- forwardSearch
|
||||
vim.keymap.set('n', '<leader>k', ':TexlabForward<CR>' )
|
||||
-- if lsp failed to start, start manually
|
||||
vim.keymap.set('n', '<leader>j', ':LspStart<CR>' )
|
||||
|
||||
------------------------------
|
||||
-- END texmagic, texlab
|
||||
------------------------------
|
||||
|
||||
'';
|
||||
--------------------------------
|
||||
-- START texlab main config
|
||||
-- if used with texmagic, disable this
|
||||
--------------------------------
|
||||
auxDirectory = "tex_aux_output",
|
||||
rootDirectory = nil,
|
||||
build = {
|
||||
-- forwardSearchAfter = true,
|
||||
executable = "latexmk",
|
||||
args = {
|
||||
"-xelatex",
|
||||
"-verbose",
|
||||
-- "-outdir=%f_output",
|
||||
-- "-auxdir=%f_aux",
|
||||
"-outdir=tex_aux_output",
|
||||
"-file-line-error",
|
||||
"-synctex=1",
|
||||
"-interaction=nonstopmode",
|
||||
"-pv",
|
||||
"%f",
|
||||
},
|
||||
isContinuous = false,
|
||||
-- "onSave = true" failed to work properly with large files like moderncv
|
||||
-- it would not build properly until you delete all the intermediate files
|
||||
-- onSave = true
|
||||
},
|
||||
--------------------------------
|
||||
-- END texlab main config
|
||||
-- if used with texmagic, disable this
|
||||
--------------------------------
|
||||
--https://github.com/latex-lsp/texlab/wiki/Previewing
|
||||
-- https://github.com/f3fora/nvim-texlabconfig
|
||||
forwardSearch = {
|
||||
executable = "zathura",
|
||||
args = {
|
||||
-- This is for moving lines in nvim
|
||||
'--synctex-editor-command',
|
||||
-- I don't know why but after switching to lazy.vim, need %%% to escape the % character, so "pgrep zathura -a" can see the % sign
|
||||
[[nvim-texlabconfig -file '%%%{input}' -line %%%{line} -server ]] .. vim.v.servername,
|
||||
'--synctex-forward',
|
||||
'%l:1:%f',
|
||||
'%p',
|
||||
},
|
||||
},
|
||||
diagnosticsDelay = 300,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- compile laTeX keymap
|
||||
vim.keymap.set('n', '<leader>l', ':TexlabBuild<CR>' )
|
||||
-- forwardSearch
|
||||
vim.keymap.set('n', '<leader>k', ':TexlabForward<CR>' )
|
||||
-- if lsp failed to start, start manually
|
||||
vim.keymap.set('n', '<leader>j', ':LspStart<CR>' )
|
||||
|
||||
------------------------------
|
||||
-- END texmagic, texlab
|
||||
------------------------------
|
||||
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
plugins = {
|
||||
lualine = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
plugins = {
|
||||
lualine = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,94 +1,84 @@
|
|||
{ pkgs, pkgs-stable, ... }:
|
||||
# vim: ts=4:sts=0:sw=0:noet
|
||||
{
|
||||
# https://github.com/nvim-neorg/neorg
|
||||
# NOW neorg require lua-utils.nvim, nvim-nio, pathlib.vim
|
||||
# https://github.com/nix-community/nixvim/issues/1395#issuecomment-2267262919
|
||||
# Workaround
|
||||
extraPlugins = [
|
||||
(pkgs.vimUtils.buildVimPlugin { inherit (pkgs.luaPackages.lua-utils-nvim) pname version src; })
|
||||
pkgs-stable
|
||||
, ... }:
|
||||
{
|
||||
plugins = {
|
||||
neorg = {
|
||||
enable = true;
|
||||
package = pkgs-stable.vimPlugins.neorg;
|
||||
modules = {
|
||||
"core.defaults" = {}; # -- Loads default behaviour
|
||||
"core.summary" = {};
|
||||
"core.export" = {};
|
||||
"core.export.markdown" = {};
|
||||
"core.concealer" = {
|
||||
config = {
|
||||
folds = false;
|
||||
};
|
||||
}; #-- Adds pretty icons to your documents
|
||||
"core.dirman" = {
|
||||
config = {
|
||||
workspaces = {
|
||||
n = "~/neorg/notes";
|
||||
e = "~/neorg/english";
|
||||
l = "~/neorg/letter";
|
||||
g = "~/neorg/grammar";
|
||||
p = "~/neorg/perl";
|
||||
m = "~/neorg/misc";
|
||||
# nvim = "~/.config/nvim/NeorgNvimNotes";
|
||||
};
|
||||
default_workspace = "m";
|
||||
};
|
||||
};
|
||||
"core.keybinds" = {
|
||||
config = {
|
||||
default_keybinds = true;
|
||||
hook.__raw = ''
|
||||
function(keybinds)
|
||||
keybinds.unmap("norg", "i", "<M-CR>")
|
||||
keybinds.remap_event("norg", "i", "<S-CR>", "core.itero.next-iteration", "<CR>")
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
extraConfigLua = ''
|
||||
----------------------------------------------------
|
||||
-- START Neorg config
|
||||
----------------------------------------------------
|
||||
-- vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, {
|
||||
-- pattern = '*.norg',
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'norg',
|
||||
callback = function()
|
||||
vim.opt.formatoptions:remove('r')
|
||||
vim.opt.formatoptions:remove('o')
|
||||
|
||||
(pkgs.vimUtils.buildVimPlugin { inherit (pkgs.luaPackages.pathlib-nvim) pname version src; })
|
||||
|
||||
(pkgs.vimUtils.buildVimPlugin { inherit (pkgs.luaPackages.nvim-nio) pname version src; })
|
||||
];
|
||||
|
||||
plugins = {
|
||||
neorg = {
|
||||
enable = true;
|
||||
# package = pkgs-stable.vimPlugins.neorg;
|
||||
package = pkgs.vimPlugins.neorg;
|
||||
modules = {
|
||||
"core.defaults" = { }; # -- Loads default behaviour
|
||||
"core.summary" = { };
|
||||
"core.export" = { };
|
||||
"core.export.markdown" = { };
|
||||
"core.concealer" = {
|
||||
config = {
|
||||
folds = false;
|
||||
};
|
||||
}; # -- Adds pretty icons to your documents
|
||||
"core.dirman" = {
|
||||
config = {
|
||||
workspaces = {
|
||||
n = "~/neorg/notes";
|
||||
e = "~/neorg/english";
|
||||
l = "~/neorg/letter";
|
||||
g = "~/neorg/grammar";
|
||||
p = "~/neorg/perl";
|
||||
m = "~/neorg/misc";
|
||||
# nvim = "~/.config/nvim/NeorgNvimNotes";
|
||||
};
|
||||
default_workspace = "m";
|
||||
};
|
||||
};
|
||||
"core.keybinds" = {
|
||||
config = {
|
||||
default_keybinds = true;
|
||||
hook.__raw = ''
|
||||
function(keybinds)
|
||||
keybinds.unmap("norg", "i", "<M-CR>")
|
||||
keybinds.remap_event("norg", "i", "<S-CR>", "core.itero.next-iteration", "<CR>")
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
extraConfigLua = ''
|
||||
----------------------------------------------------
|
||||
-- START Neorg config
|
||||
----------------------------------------------------
|
||||
-- vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, {
|
||||
-- pattern = '*.norg',
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'norg',
|
||||
callback = function()
|
||||
vim.opt.formatoptions:remove('r')
|
||||
vim.opt.formatoptions:remove('o')
|
||||
|
||||
-- https://github.com/nvim-neorg/neorg/discussions/1066
|
||||
vim.opt.conceallevel = 2
|
||||
vim.keymap.set( 'n', '<leader>Nt', function()
|
||||
if vim.opt.conceallevel:get() == 2 then
|
||||
vim.opt.conceallevel = 0
|
||||
elseif vim.opt.conceallevel:get() == 0 then
|
||||
vim.opt.conceallevel = 2
|
||||
end
|
||||
vim.cmd('Neorg toggle-concealer')
|
||||
end, { desc = 'Neorg toggle-concealer and conceallevel' })
|
||||
-- use this insteand: ['core.concealer'] = { config = { folds = false }, },
|
||||
-- vim.opt.foldlevelstart = 99
|
||||
vim.keymap.set( 'n', '<leader>Ng', function() vim.cmd.Neorg('generate-workspace-summary') end, { desc = 'generate-workspace-summary' })
|
||||
vim.keymap.set( 'n', '<leader>NT', function() vim.cmd.Neorg('toc') end, { desc = 'Table of Content' })
|
||||
end,
|
||||
})
|
||||
vim.keymap.set( 'n', '<leader>Nw', function() vim.api.nvim_feedkeys(':Neorg workspace ', 'n', true) end, { desc = 'Neorg workspace <fill>' })
|
||||
vim.keymap.set( 'n', '<leader>Ni', function() vim.cmd('Neorg index') end, { desc = 'Neorg index' })
|
||||
vim.keymap.set( 'n', '<leader>Nr', function() vim.cmd('Neorg return') end, { desc = 'Neorg return' })
|
||||
vim.keymap.set( 'n', '<leader>Ne', function() vim.cmd('Neorg workspace e') end, { desc = 'Neorg workspace e (neorg-english)' })
|
||||
----------------------------------------------------
|
||||
-- END Neorg config
|
||||
----------------------------------------------------
|
||||
'';
|
||||
-- https://github.com/nvim-neorg/neorg/discussions/1066
|
||||
vim.opt.conceallevel = 2
|
||||
vim.keymap.set( 'n', '<leader>Nt', function()
|
||||
if vim.opt.conceallevel:get() == 2 then
|
||||
vim.opt.conceallevel = 0
|
||||
elseif vim.opt.conceallevel:get() == 0 then
|
||||
vim.opt.conceallevel = 2
|
||||
end
|
||||
vim.cmd('Neorg toggle-concealer')
|
||||
end, { desc = 'Neorg toggle-concealer and conceallevel' })
|
||||
-- use this insteand: ['core.concealer'] = { config = { folds = false }, },
|
||||
-- vim.opt.foldlevelstart = 99
|
||||
vim.keymap.set( 'n', '<leader>Ng', function() vim.cmd.Neorg('generate-workspace-summary') end, { desc = 'generate-workspace-summary' })
|
||||
vim.keymap.set( 'n', '<leader>NT', function() vim.cmd.Neorg('toc') end, { desc = 'Table of Content' })
|
||||
end,
|
||||
})
|
||||
vim.keymap.set( 'n', '<leader>Nw', function() vim.api.nvim_feedkeys(':Neorg workspace ', 'n', true) end, { desc = 'Neorg workspace <fill>' })
|
||||
vim.keymap.set( 'n', '<leader>Ni', function() vim.cmd('Neorg index') end, { desc = 'Neorg index' })
|
||||
vim.keymap.set( 'n', '<leader>Nr', function() vim.cmd('Neorg return') end, { desc = 'Neorg return' })
|
||||
vim.keymap.set( 'n', '<leader>Ne', function() vim.cmd('Neorg workspace e') end, { desc = 'Neorg workspace e (neorg-english)' })
|
||||
----------------------------------------------------
|
||||
-- END Neorg config
|
||||
----------------------------------------------------
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
plugins = {
|
||||
nvim-tree = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
plugins = {
|
||||
nvim-tree = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
plugins = {
|
||||
sleuth = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
plugins = {
|
||||
sleuth = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,190 +1,190 @@
|
|||
{
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
extensions = {
|
||||
fzf-native = {
|
||||
enable = true;
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
extensions = {
|
||||
fzf-native = {
|
||||
enable = true;
|
||||
};
|
||||
# project-nvim = {
|
||||
# enable = true;
|
||||
# };
|
||||
# ui-select = {
|
||||
# settings = {
|
||||
# specific_opts = {
|
||||
# codeactions = true;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
undo = {
|
||||
enable = true;
|
||||
mappings = {
|
||||
i = {
|
||||
"<cr>" = "yank_additions";
|
||||
"<s-cr>" = "yank_deletions";
|
||||
"<c-cr>" = "restore";
|
||||
};
|
||||
n = {
|
||||
"y" = "yank_additions";
|
||||
"Y" = "yank_deletions";
|
||||
"u" = "restore";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
# project-nvim = {
|
||||
# enable = true;
|
||||
# };
|
||||
# ui-select = {
|
||||
# settings = {
|
||||
# specific_opts = {
|
||||
# codeactions = true;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
undo = {
|
||||
enable = true;
|
||||
settings.mappings = {
|
||||
# If you'd prefer Telescope not to enter a normal-like mode when hitting escape (and instead exiting), you can map <Esc> to do so via:
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
"<cr>" = "require('telescope-undo.actions').yank_additions";
|
||||
"<s-cr>" = "require('telescope-undo.actions').yank_deletions";
|
||||
"<c-cr>" = "require('telescope-undo.actions').restore";
|
||||
};
|
||||
n = {
|
||||
"y" = "require('telescope-undo.actions').yank_additions";
|
||||
"Y" = "require('telescope-undo.actions').yank_deletions";
|
||||
"u" = "require('telescope-undo.actions').restore";
|
||||
"<esc>" = {
|
||||
__raw = ''
|
||||
function(...)
|
||||
return require("telescope.actions").close(...)
|
||||
end'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
# If you'd prefer Telescope not to enter a normal-like mode when hitting escape (and instead exiting), you can map <Esc> to do so via:
|
||||
settings.defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
"<esc>" = {
|
||||
__raw = ''
|
||||
function(...)
|
||||
return require("telescope.actions").close(...)
|
||||
end'';
|
||||
};
|
||||
keymaps = {
|
||||
"<leader><space>" = {
|
||||
action = "find_files, {}";
|
||||
desc = "Find project files";
|
||||
};
|
||||
"<leader>/" = {
|
||||
action = "live_grep";
|
||||
desc = "Grep (root dir)";
|
||||
};
|
||||
"<leader>:" = {
|
||||
action = "command_history, {}";
|
||||
desc = "Command History";
|
||||
};
|
||||
"<leader>b" = {
|
||||
action = "buffers, {}";
|
||||
desc = "+buffer";
|
||||
};
|
||||
"<leader>ff" = {
|
||||
action = "find_files, {}";
|
||||
desc = "Find project files";
|
||||
};
|
||||
"<leader>fr" = {
|
||||
action = "oldfiles, {}";
|
||||
desc = "Recent";
|
||||
};
|
||||
"<leader>fb" = {
|
||||
action = "buffers, {}";
|
||||
desc = "Buffers";
|
||||
};
|
||||
"<C-p>" = {
|
||||
action = "git_files, {}";
|
||||
desc = "Search git files";
|
||||
};
|
||||
"<leader>gc" = {
|
||||
action = "git_commits, {}";
|
||||
desc = "Commits";
|
||||
};
|
||||
"<leader>gs" = {
|
||||
action = "git_status, {}";
|
||||
desc = "Status";
|
||||
};
|
||||
"<leader>sa" = {
|
||||
action = "autocommands, {}";
|
||||
desc = "Auto Commands";
|
||||
};
|
||||
"<leader>sb" = {
|
||||
action = "current_buffer_fuzzy_find, {}";
|
||||
desc = "Buffer";
|
||||
};
|
||||
"<leader>sc" = {
|
||||
action = "command_history, {}";
|
||||
desc = "Command History";
|
||||
};
|
||||
"<leader>sC" = {
|
||||
action = "commands, {}";
|
||||
desc = "Commands";
|
||||
};
|
||||
"<leader>sD" = {
|
||||
action = "diagnostics, {}";
|
||||
desc = "Workspace diagnostics";
|
||||
};
|
||||
"<leader>sh" = {
|
||||
action = "help_tags, {}";
|
||||
desc = "Help pages";
|
||||
};
|
||||
"<leader>sH" = {
|
||||
action = "highlights, {}";
|
||||
desc = "Search Highlight Groups";
|
||||
};
|
||||
"<leader>sk" = {
|
||||
action = "keymaps, {}";
|
||||
desc = "Keymaps";
|
||||
};
|
||||
"<leader>sM" = {
|
||||
action = "man_pages, {}";
|
||||
desc = "Man pages";
|
||||
};
|
||||
"<leader>sm" = {
|
||||
action = "marks, {}";
|
||||
desc = "Jump to Mark";
|
||||
};
|
||||
"<leader>so" = {
|
||||
action = "vim_options, {}";
|
||||
desc = "Options";
|
||||
};
|
||||
"<leader>sR" = {
|
||||
action = "resume, {}";
|
||||
desc = "Resume";
|
||||
};
|
||||
"<leader>uC" = {
|
||||
action = "colorscheme, {}";
|
||||
desc = "Colorscheme preview";
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = {
|
||||
"<leader><space>" = {
|
||||
action = "find_files, {}";
|
||||
options.desc = "Find project files";
|
||||
};
|
||||
"<leader>/" = {
|
||||
action = "live_grep";
|
||||
options.desc = "Grep (root dir)";
|
||||
};
|
||||
"<leader>:" = {
|
||||
action = "command_history, {}";
|
||||
options.desc = "Command History";
|
||||
};
|
||||
"<leader>b" = {
|
||||
action = "buffers, {}";
|
||||
options.desc = "+buffer";
|
||||
};
|
||||
"<leader>ff" = {
|
||||
action = "find_files, {}";
|
||||
options.desc = "Find project files";
|
||||
};
|
||||
"<leader>fr" = {
|
||||
action = "oldfiles, {}";
|
||||
options.desc = "Recent";
|
||||
};
|
||||
"<leader>fb" = {
|
||||
action = "buffers, {}";
|
||||
options.desc = "Buffers";
|
||||
};
|
||||
"<C-p>" = {
|
||||
action = "git_files, {}";
|
||||
options.desc = "Search git files";
|
||||
};
|
||||
"<leader>gc" = {
|
||||
action = "git_commits, {}";
|
||||
options.desc = "Commits";
|
||||
};
|
||||
"<leader>gs" = {
|
||||
action = "git_status, {}";
|
||||
options.desc = "Status";
|
||||
};
|
||||
"<leader>sa" = {
|
||||
action = "autocommands, {}";
|
||||
options.desc = "Auto Commands";
|
||||
};
|
||||
"<leader>sb" = {
|
||||
action = "current_buffer_fuzzy_find, {}";
|
||||
options.desc = "Buffer";
|
||||
};
|
||||
"<leader>sc" = {
|
||||
action = "command_history, {}";
|
||||
options.desc = "Command History";
|
||||
};
|
||||
"<leader>sC" = {
|
||||
action = "commands, {}";
|
||||
options.desc = "Commands";
|
||||
};
|
||||
"<leader>sD" = {
|
||||
action = "diagnostics, {}";
|
||||
options.desc = "Workspace diagnostics";
|
||||
};
|
||||
"<leader>sh" = {
|
||||
action = "help_tags, {}";
|
||||
options.desc = "Help pages";
|
||||
};
|
||||
"<leader>sH" = {
|
||||
action = "highlights, {}";
|
||||
options.desc = "Search Highlight Groups";
|
||||
};
|
||||
"<leader>sk" = {
|
||||
action = "keymaps, {}";
|
||||
options.desc = "Keymaps";
|
||||
};
|
||||
"<leader>sM" = {
|
||||
action = "man_pages, {}";
|
||||
options.desc = "Man pages";
|
||||
};
|
||||
"<leader>sm" = {
|
||||
action = "marks, {}";
|
||||
options.desc = "Jump to Mark";
|
||||
};
|
||||
"<leader>so" = {
|
||||
action = "vim_options, {}";
|
||||
options.desc = "Options";
|
||||
};
|
||||
"<leader>sR" = {
|
||||
action = "resume, {}";
|
||||
options.desc = "Resume";
|
||||
};
|
||||
"<leader>uC" = {
|
||||
action = "colorscheme, {}";
|
||||
options.desc = "Colorscheme preview";
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fp";
|
||||
action = "<cmd>Telescope projects<CR>";
|
||||
options = {
|
||||
desc = "Projects";
|
||||
};
|
||||
}
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fp";
|
||||
action = "<cmd>Telescope projects<CR>";
|
||||
options = {
|
||||
desc = "Projects";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>sd";
|
||||
action = "<cmd>Telescope diagnostics bufnr=0<cr>";
|
||||
options = {
|
||||
desc = "Document diagnostics";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>sd";
|
||||
action = "<cmd>Telescope diagnostics bufnr=0<cr>";
|
||||
options = {
|
||||
desc = "Document diagnostics";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>st";
|
||||
action = "<cmd>TodoTelescope<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Todo (Telescope)";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>st";
|
||||
action = "<cmd>TodoTelescope<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Todo (Telescope)";
|
||||
};
|
||||
}
|
||||
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "<leader>,";
|
||||
# action = "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>";
|
||||
# options = {
|
||||
# desc = "Switch Buffer";
|
||||
# };
|
||||
# }
|
||||
];
|
||||
extraConfigLua = ''
|
||||
local telescope = require('telescope')
|
||||
telescope.setup{
|
||||
pickers = {
|
||||
colorscheme = {
|
||||
enable_preview = true
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "<leader>,";
|
||||
# action = "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>";
|
||||
# options = {
|
||||
# desc = "Switch Buffer";
|
||||
# };
|
||||
# }
|
||||
];
|
||||
extraConfigLua = ''
|
||||
local telescope = require('telescope')
|
||||
telescope.setup{
|
||||
pickers = {
|
||||
colorscheme = {
|
||||
enable_preview = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
incrementalSelection = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
initSelection = "g<space><space>";
|
||||
nodeIncremental = "g<space><space>";
|
||||
scopeIncremental = "<c-s>";
|
||||
nodeDecremental = "g<space>m";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
incrementalSelection = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
initSelection = "g<space><space>";
|
||||
nodeIncremental = "g<space><space>";
|
||||
scopeIncremental = "<c-s>";
|
||||
nodeDecremental = "g<space>m";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
plugins = {
|
||||
which-key = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
plugins = {
|
||||
which-key = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
110
config/sets.nix
110
config/sets.nix
|
|
@ -1,71 +1,73 @@
|
|||
# The line beneath this is called `modeline`. See `:help modeline`
|
||||
# vim: ts=4:sts=0:sw=0:noet
|
||||
{
|
||||
config = {
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
};
|
||||
opts = {
|
||||
relativenumber = true;
|
||||
splitbelow = true;
|
||||
redrawtime = 5000;
|
||||
config = {
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
};
|
||||
options = {
|
||||
relativenumber = true;
|
||||
splitbelow = true;
|
||||
redrawtime = 5000;
|
||||
|
||||
# new split to the right
|
||||
splitright = true;
|
||||
# new split to the right
|
||||
splitright = true;
|
||||
|
||||
# show hidden characters
|
||||
list = true;
|
||||
# show hidden characters
|
||||
list = true;
|
||||
|
||||
# don't break words on the edge
|
||||
linebreak = true;
|
||||
wrap = true;
|
||||
# length of an actual \t character:
|
||||
# https://stackoverflow.com/questions/191201/indenting-comments-to-match-code-in-vim
|
||||
smartindent = false;
|
||||
# length to use when shifting text (eg. <<, >> and == commands)
|
||||
# don't break words on the edge
|
||||
linebreak = true;
|
||||
wrap = true;
|
||||
# length of an actual \t character:
|
||||
# https://stackoverflow.com/questions/191201/indenting-comments-to-match-code-in-vim
|
||||
smartindent = false;
|
||||
# length to use when shifting text (eg. <<, >> and == commands)
|
||||
|
||||
tabstop = 4;
|
||||
shiftwidth = 0;
|
||||
tabstop=4;
|
||||
shiftwidth = 0;
|
||||
|
||||
expandtab = false;
|
||||
autoindent = true;
|
||||
# Set highlight on search
|
||||
hlsearch = false;
|
||||
expandtab = false;
|
||||
autoindent = true;
|
||||
# Set highlight on search
|
||||
hlsearch = false;
|
||||
|
||||
# Make line numbers default
|
||||
number = true;
|
||||
# Make line numbers default
|
||||
number = true;
|
||||
|
||||
# Enable mouse mode
|
||||
mouse = "a";
|
||||
# Enable mouse mode
|
||||
mouse = "a";
|
||||
|
||||
# Sync clipboard between OS and Neovim.
|
||||
# Remove this option if you want your OS clipboard to remain independent.
|
||||
# See `:help 'clipboard'`
|
||||
# vim.o.clipboard = 'unnamedplus' -- REMOVED BY ME
|
||||
# Sync clipboard between OS and Neovim.
|
||||
# Remove this option if you want your OS clipboard to remain independent.
|
||||
# See `:help 'clipboard'`
|
||||
# vim.o.clipboard = 'unnamedplus' -- REMOVED BY ME
|
||||
|
||||
# Enable break indent
|
||||
breakindent = true;
|
||||
# Enable break indent
|
||||
breakindent = true;
|
||||
|
||||
# Save undo history
|
||||
# vim.o.undofile = true -- REMOVED BY ME
|
||||
# Save undo history
|
||||
# vim.o.undofile = true -- REMOVED BY ME
|
||||
|
||||
# Case insensitive searching UNLESS /C or capital in search
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
# Case insensitive searching UNLESS /C or capital in search
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
|
||||
# Keep signcolumn on by default
|
||||
signcolumn = "yes";
|
||||
# Keep signcolumn on by default
|
||||
signcolumn = "yes";
|
||||
|
||||
# Decrease update time
|
||||
updatetime = 250;
|
||||
timeout = true;
|
||||
# timeoutlen = 1000; # time of valid keypress like for leader key in millisecond
|
||||
timeoutlen = 300; # lower to 300 in favor of which-key plugins
|
||||
# Decrease update time
|
||||
updatetime = 250;
|
||||
timeout = true;
|
||||
# timeoutlen = 1000; # time of valid keypress like for leader key in millisecond
|
||||
timeoutlen = 300; # lower to 300 in favor of which-key plugins
|
||||
|
||||
# Set completeopt to have a better completion experience
|
||||
completeopt = "menuone,noselect";
|
||||
# Set completeopt to have a better completion experience
|
||||
completeopt = "menuone,noselect";
|
||||
|
||||
# NOTE: You should make sure your terminal supports this
|
||||
termguicolors = true;
|
||||
};
|
||||
};
|
||||
# NOTE: You should make sure your terminal supports this
|
||||
termguicolors = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
359
flake.lock
generated
359
flake.lock
generated
|
|
@ -2,17 +2,18 @@
|
|||
"nodes": {
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722113426,
|
||||
"narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
|
||||
"lastModified": 1711099426,
|
||||
"narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
|
||||
"rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -22,38 +23,6 @@
|
|||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1641205782,
|
||||
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1641205782,
|
||||
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_3": {
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
|
|
@ -67,7 +36,7 @@
|
|||
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||
}
|
||||
},
|
||||
"flake-compat_4": {
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
|
|
@ -91,11 +60,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722555600,
|
||||
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
|
||||
"lastModified": 1709336216,
|
||||
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
|
||||
"rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -126,6 +95,24 @@
|
|||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
|
|
@ -140,68 +127,11 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"locked": {
|
||||
"lastModified": 1644229661,
|
||||
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"locked": {
|
||||
"lastModified": 1644229661,
|
||||
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_4",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722857853,
|
||||
"narHash": "sha256-3Zx53oz/MSIyevuWO/SumxABkrIvojnB7g9cimxkhiE=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "06939f6b7ec4d4f465bf3132a05367cccbbf64da",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"git-hooks",
|
||||
"pre-commit-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
|
|
@ -227,75 +157,19 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720042825,
|
||||
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
||||
"lastModified": 1711133180,
|
||||
"narHash": "sha256-WJOahf+6115+GMl3wUfURu8fszuNeJLv9qAWFQl3Vmo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
||||
"rev": "1c2c5e4cabba4c43504ef0f8cc3f3dfa284e2dbb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neorg": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1722198397,
|
||||
"narHash": "sha256-oaZi6UP8gC0uy1QYrXrewfYoJpds16GP+Rnef8CAaRA=",
|
||||
"owner": "nvim-neorg",
|
||||
"repo": "neorg",
|
||||
"rev": "e5e797e6eddcb6efb1d2c3fc2612b31ad9a76cef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-neorg",
|
||||
"repo": "neorg",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neorg-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"neorg": "neorg",
|
||||
"neorg-telescope": "neorg-telescope",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"norg": "norg",
|
||||
"norg-meta": "norg-meta"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722975193,
|
||||
"narHash": "sha256-SMvVuYKD4T9wQZhHs6oFUGMF9M4t2tg1bYE5c/6SJYA=",
|
||||
"owner": "nvim-neorg",
|
||||
"repo": "nixpkgs-neorg-overlay",
|
||||
"rev": "e8193159b8cceb991d91acc3762fa3a749a9beab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-neorg",
|
||||
"repo": "nixpkgs-neorg-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neorg-telescope": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1722358034,
|
||||
"narHash": "sha256-ei4uUqpIQjGKzu5ryu0Hlmis9TS9FJsYnjt4J4QdWlw=",
|
||||
"owner": "nvim-neorg",
|
||||
"repo": "neorg-telescope",
|
||||
"rev": "ddb2556644cae922699a239bbb0fe16e25b084b7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-neorg",
|
||||
"repo": "neorg-telescope",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -304,11 +178,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722924007,
|
||||
"narHash": "sha256-+CQDamNwqO33REJLft8c26NbUi2Td083hq6SvAm2xkU=",
|
||||
"lastModified": 1710717205,
|
||||
"narHash": "sha256-Wf3gHh5uV6W1TV/A8X8QJf99a5ypDSugY4sNtdJDe0A=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "91010a5613ffd7ee23ee9263213157a1c422b705",
|
||||
"rev": "bcc8afd06e237df060c85bad6af7128e05fd61a3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -319,76 +193,46 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1722957468,
|
||||
"narHash": "sha256-SQ0TCC4aklOhN/OzcztrKqDLY8SjpIZcyvTulzhDXs0=",
|
||||
"lastModified": 1711401922,
|
||||
"narHash": "sha256-QoQqXoj8ClGo0sqD/qWKFWezgEwUL0SUh37/vY2jNhc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2a13929e1f191b3690dd2f2db13098b04adb9043",
|
||||
"rev": "07262b18b97000d16a4bdb003418bd2fb067a932",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1644486793,
|
||||
"narHash": "sha256-EeijR4guVHgVv+JpOX3cQO+1XdrkJfGmiJ9XVsVU530=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1882c6b7368fd284ad01b0a5b5601ef136321292",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1644486793,
|
||||
"narHash": "sha256-EeijR4guVHgVv+JpOX3cQO+1XdrkJfGmiJ9XVsVU530=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1882c6b7368fd284ad01b0a5b5601ef136321292",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 0,
|
||||
"narHash": "sha256-7ojM1KSk3mzutD7SkrdSflHXEujPvW1u7QuqWoTLXQU=",
|
||||
"path": "/nix/store/79j6vc975md1w3f2fgli3xw657zyxxyc-source",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1722869614,
|
||||
"narHash": "sha256-7ojM1KSk3mzutD7SkrdSflHXEujPvW1u7QuqWoTLXQU=",
|
||||
"lastModified": 1712437997,
|
||||
"narHash": "sha256-g0whLLwRvgO2FsyhY8fNk+TWenS3jg5UdlWL4uqgFeo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "883180e6550c1723395a3a342f830bfc5c371f6b",
|
||||
"rev": "e38d7cb66ea4f7a0eb6681920615dfcc30fc2920",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"ref": "nixos-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1711333969,
|
||||
"narHash": "sha256-5PiWGn10DQjMZee5NXzeA6ccsv60iLu+Xtw+mfvkUAs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "57e6b3a9e4ebec5aa121188301f04a6b8c354c9b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
@ -396,75 +240,60 @@
|
|||
"nixvim": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts",
|
||||
"git-hooks": "git-hooks",
|
||||
"home-manager": "home-manager",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722925293,
|
||||
"narHash": "sha256-saXm5dd/e3PMsYTEcp1Qbzifm3KsZtNFkrWjmLhXHGE=",
|
||||
"lastModified": 1711545203,
|
||||
"narHash": "sha256-PPXcH/pIbxr8awgC+q+rrIgRRH8uYeWoK5Af3kFhjEc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "170df9814c3e41d5a4d6e3339e611801b1f02ce2",
|
||||
"rev": "d248bf587cdb86b661ca54f16fe2f3263018b985",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"norg": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1672582520,
|
||||
"narHash": "sha256-kv3UiJUqMSF1qd3r4OCWomVTHTYjwX/EBRWm8mOSdwg=",
|
||||
"owner": "nvim-neorg",
|
||||
"repo": "tree-sitter-norg",
|
||||
"rev": "d7a466e182a532065a559dbfc7a847271d5e9c29",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-neorg",
|
||||
"ref": "dev",
|
||||
"repo": "tree-sitter-norg",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"norg-meta": {
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
"flake-utils": "flake-utils_3",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713028366,
|
||||
"narHash": "sha256-8qSdwHlfnjFuQF4zNdLtU2/tzDRhDZbo9K54Xxgn5+8=",
|
||||
"owner": "nvim-neorg",
|
||||
"repo": "tree-sitter-norg-meta",
|
||||
"rev": "6f0510cc516a3af3396a682fbd6655486c2c9d2d",
|
||||
"lastModified": 1711409088,
|
||||
"narHash": "sha256-+rTCra8TY4vuSNTtQ0tcex1syCRPoKyb8vyHmoxkga4=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "db656fc3e34907000df26e8bc5cc3c94fb27f353",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-neorg",
|
||||
"repo": "tree-sitter-norg-meta",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"neorg-overlay": "neorg-overlay",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixvim": "nixvim"
|
||||
}
|
||||
},
|
||||
|
|
@ -498,24 +327,18 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1722330636,
|
||||
"narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "768acdb06968e53aa1ee8de207fd955335c754b7",
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
40
flake.nix
40
flake.nix
|
|
@ -1,41 +1,26 @@
|
|||
{
|
||||
# https://github.com/redyf/Neve/blob/main/flake.nix
|
||||
description = "my_nixvim flake, Neve mod (only flake.nix)";
|
||||
description = "my_nixvim flake";
|
||||
|
||||
inputs = {
|
||||
# https://github.com/nix-community/nixvim/issues/1859
|
||||
# use nixos-24.05 branch to get rid of "error: attribute 'cmp-ai' missing"
|
||||
nixvim.url = "github:nix-community/nixvim/nixos-24.05";
|
||||
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
# nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
nixvim.url = "github:nix-community/nixvim";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
# https://github.com/nvim-neorg/nixpkgs-neorg-overlay
|
||||
# https://github.com/nix-community/nixvim/issues/1395
|
||||
neorg-overlay.url = "github:nvim-neorg/nixpkgs-neorg-overlay";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self
|
||||
, nixpkgs
|
||||
# , nixpkgs-stable
|
||||
, nixvim
|
||||
, flake-utils
|
||||
, neorg-overlay
|
||||
, ...
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-stable,
|
||||
nixvim,
|
||||
flake-utils,
|
||||
...
|
||||
} @ inputs: let
|
||||
config = import ./config; # import the module directly
|
||||
in
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
nixvimLib = nixvim.lib.${system};
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
nixpkgs.overlays = [ neorg-overlay.overlays.default ];
|
||||
};
|
||||
# pkgs-stable = import nixpkgs-stable {
|
||||
# inherit system;
|
||||
# nixpkgs.overlays = [ neorg-overlay.overlays.default ];
|
||||
# };
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
pkgs-stable = import nixpkgs-stable {inherit system;};
|
||||
nixvim' = nixvim.legacyPackages.${system};
|
||||
nvim = nixvim'.makeNixvimWithModule {
|
||||
inherit pkgs;
|
||||
|
|
@ -43,8 +28,7 @@
|
|||
# You can use `extraSpecialArgs` to pass additional arguments to your module files
|
||||
extraSpecialArgs = {
|
||||
inherit self;
|
||||
# inherit pkgs-stable;
|
||||
inherit pkgs;
|
||||
inherit pkgs-stable;
|
||||
};
|
||||
};
|
||||
in {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue