format with nixfmt
This commit is contained in:
parent
89382ce25e
commit
9c77d8a217
22 changed files with 847 additions and 826 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
colorschemes.gruvbox ={
|
colorschemes.gruvbox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,59 +1,58 @@
|
||||||
{
|
{
|
||||||
colorschemes.onedark = {
|
colorschemes.onedark = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
----------------------------------
|
----------------------------------
|
||||||
-- START custom setup for onedark
|
-- START custom setup for onedark
|
||||||
----------------------------------
|
----------------------------------
|
||||||
-- https://github.com/navarasu/onedark.nvim
|
-- https://github.com/navarasu/onedark.nvim
|
||||||
require('onedark').setup {
|
require('onedark').setup {
|
||||||
-- Main options --
|
-- Main options --
|
||||||
style = 'darker', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
|
style = 'darker', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
|
||||||
transparent = true, -- Show/hide background
|
transparent = true, -- Show/hide background
|
||||||
term_colors = true, -- Change terminal color as per the selected theme style
|
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
|
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
|
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
|
||||||
|
|
||||||
-- toggle theme style ---
|
-- 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 = 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_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', 'light'}, -- List of styles to toggle between
|
||||||
toggle_style_list = {'dark', 'darker', 'cool', 'deep', 'warm', 'warmer'}, -- List of styles to toggle between
|
toggle_style_list = {'dark', 'darker', 'cool', 'deep', 'warm', 'warmer'}, -- List of styles to toggle between
|
||||||
|
|
||||||
-- Change code style ---
|
-- Change code style ---
|
||||||
-- Options are italic, bold, underline, none
|
-- Options are italic, bold, underline, none
|
||||||
-- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold'
|
-- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold'
|
||||||
code_style = {
|
code_style = {
|
||||||
comments = 'italic',
|
comments = 'italic',
|
||||||
keywords = 'none',
|
keywords = 'none',
|
||||||
functions = 'none',
|
functions = 'none',
|
||||||
strings = 'none',
|
strings = 'none',
|
||||||
variables = 'none'
|
variables = 'none'
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Lualine options --
|
-- Lualine options --
|
||||||
-- lualine = {
|
-- lualine = {
|
||||||
-- transparent = true, -- lualine center bar transparency
|
-- transparent = true, -- lualine center bar transparency
|
||||||
-- },
|
-- },
|
||||||
|
|
||||||
-- Custom Highlights --
|
-- Custom Highlights --
|
||||||
colors = {}, -- Override default colors
|
colors = {}, -- Override default colors
|
||||||
highlights = {}, -- Override highlight groups
|
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,30 +1,28 @@
|
||||||
# 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
|
# Import all your configuration modules here
|
||||||
imports = [
|
imports = [
|
||||||
./colorscheme/onedark.nix
|
./colorscheme/onedark.nix
|
||||||
# ./colorscheme/gruvbox.nix
|
# ./colorscheme/gruvbox.nix
|
||||||
|
|
||||||
./sets.nix
|
./sets.nix
|
||||||
./keymaps.nix
|
./keymaps.nix
|
||||||
|
|
||||||
./plugins/bufferline.nix
|
./plugins/bufferline.nix
|
||||||
./plugins/comment.nix
|
./plugins/comment.nix
|
||||||
./plugins/fugitive.nix
|
./plugins/fugitive.nix
|
||||||
./plugins/indent-blankline.nix
|
./plugins/indent-blankline.nix
|
||||||
./plugins/leap.nix
|
./plugins/leap.nix
|
||||||
./plugins/lualine.nix
|
./plugins/lualine.nix
|
||||||
./plugins/nvim-tree.nix
|
./plugins/nvim-tree.nix
|
||||||
./plugins/sleuth.nix
|
./plugins/sleuth.nix
|
||||||
./plugins/gitsigns.nix
|
./plugins/gitsigns.nix
|
||||||
./plugins/which-key.nix
|
./plugins/which-key.nix
|
||||||
./plugins/telescope.nix
|
./plugins/telescope.nix
|
||||||
./plugins/neorg.nix
|
./plugins/neorg.nix
|
||||||
./plugins/treesitter.nix
|
./plugins/treesitter.nix
|
||||||
|
|
||||||
./plugins/lsp/lsp.nix
|
./plugins/lsp/lsp.nix
|
||||||
|
|
||||||
./plugins/extra/vim-rhubarb.nix
|
./plugins/extra/vim-rhubarb.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,22 @@
|
||||||
# The line beneath this is called `modeline`. See `:help modeline`
|
|
||||||
# vim: ts=4:sts=0:sw=0:tw=78:noet
|
|
||||||
{
|
{
|
||||||
keymaps = [
|
keymaps = [
|
||||||
{
|
{
|
||||||
# vim.keymap.set({ "n", "v" }, "\\y", '"+y', {noremap=true, silent=true})
|
# vim.keymap.set({ "n", "v" }, "\\y", '"+y', {noremap=true, silent=true})
|
||||||
mode = [ "n" "v" ];
|
mode = [
|
||||||
key = "\\y";
|
"n"
|
||||||
action = "\"+y";
|
"v"
|
||||||
options = {
|
];
|
||||||
silent = true;
|
key = "\\y";
|
||||||
remap = false;
|
action = "\"+y";
|
||||||
};
|
options = {
|
||||||
}
|
silent = true;
|
||||||
];
|
remap = false;
|
||||||
extraConfigLua = ''
|
};
|
||||||
-- see ":help default-mapping"
|
}
|
||||||
-- vim.cmd[[unmap Y]]
|
];
|
||||||
vim.keymap.del( "n", "Y" )
|
extraConfigLua = ''
|
||||||
'';
|
-- see ":help default-mapping"
|
||||||
|
-- vim.cmd[[unmap Y]]
|
||||||
|
vim.keymap.del( "n", "Y" )
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins = {
|
||||||
bufferline = {
|
bufferline = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins = {
|
||||||
comment = {
|
comment = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
{ pkgs
|
{ pkgs, ... }:
|
||||||
, ...}:{
|
{
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [ vim-rhubarb ];
|
||||||
vim-rhubarb
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
{ pkgs
|
{ pkgs, ... }:
|
||||||
, ...}:{
|
{
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [ vim-sleuth ];
|
||||||
vim-sleuth
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins = {
|
||||||
fugitive = {
|
fugitive = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins = {
|
||||||
gitsigns = {
|
gitsigns = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins = {
|
||||||
indent-blankline = {
|
indent-blankline = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.indent = {
|
settings.indent = {
|
||||||
char = "▎";
|
char = "▎";
|
||||||
tab_char = "┊";
|
tab_char = "┊";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,46 @@
|
||||||
{
|
{
|
||||||
plugins.leap = {
|
plugins.leap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
addDefaultMappings = false;
|
addDefaultMappings = false;
|
||||||
};
|
};
|
||||||
keymaps = [
|
keymaps = [
|
||||||
{
|
{
|
||||||
mode = [ "n" "x" "o" ];
|
mode = [
|
||||||
key = "<leader>ss";
|
"n"
|
||||||
action = "function() require('leap').leap {} end";
|
"x"
|
||||||
lua = true;
|
"o"
|
||||||
# action = "require('leap').leap";
|
];
|
||||||
}
|
key = "<leader>ss";
|
||||||
{
|
action = "function() require('leap').leap {} end";
|
||||||
mode = [ "n" "x" "o" ];
|
lua = true;
|
||||||
key = "<leader>sS";
|
# action = "require('leap').leap";
|
||||||
action = "<Plug>(leap-backward-to)";
|
}
|
||||||
}
|
{
|
||||||
{
|
mode = [
|
||||||
mode = [ "n" "x" "o" ];
|
"n"
|
||||||
key = "<leader>sx";
|
"x"
|
||||||
action = "<Plug>(leap-forward-till)";
|
"o"
|
||||||
}
|
];
|
||||||
{
|
key = "<leader>sS";
|
||||||
mode = [ "n" "x" "o" ];
|
action = "<Plug>(leap-backward-to)";
|
||||||
key = "<leader>sX";
|
}
|
||||||
action = "<Plug>(leap-backward-till)";
|
{
|
||||||
}
|
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 = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
servers = {
|
servers = {
|
||||||
tsserver.enable = true;
|
tsserver.enable = true;
|
||||||
|
|
||||||
lua-ls.enable = true;
|
lua-ls.enable = true;
|
||||||
|
|
||||||
rust-analyzer = {
|
rust-analyzer = {
|
||||||
enable = true;
|
enable = true;
|
||||||
installCargo = true;
|
installCargo = true;
|
||||||
installRustc = true;
|
installRustc = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,220 +1,237 @@
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins = {
|
||||||
lsp-format = {
|
lsp-format = {
|
||||||
enable = false; # Enable it if you want lsp-format integration for none-ls
|
enable = false; # Enable it if you want lsp-format integration for none-ls
|
||||||
};
|
};
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
capabilities = "offsetEncoding = 'utf-16'";
|
capabilities = "offsetEncoding = 'utf-16'";
|
||||||
servers = {
|
servers = {
|
||||||
texlab = {
|
texlab = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# cmd = ["texlab"];
|
# cmd = ["texlab"];
|
||||||
# filetypes = ["tex" "plaintex" "bib"];
|
# filetypes = ["tex" "plaintex" "bib"];
|
||||||
# extraOptions = {
|
# extraOptions = {
|
||||||
# settings = {
|
# settings = {
|
||||||
# texlab = {
|
# texlab = {
|
||||||
# auxDirectory = "tex_aux_output";
|
# auxDirectory = "tex_aux_output";
|
||||||
# rootDirectory = nil;
|
# rootDirectory = nil;
|
||||||
# build = {
|
# build = {
|
||||||
# # -- forwardSearchAfter = true,
|
# # -- forwardSearchAfter = true,
|
||||||
# executable = "latexmk";
|
# executable = "latexmk";
|
||||||
# args = [
|
# args = [
|
||||||
# "-xelatex"
|
# "-xelatex"
|
||||||
# "-verbose"
|
# "-verbose"
|
||||||
# # -- "-outdir=%f_output",
|
# # -- "-outdir=%f_output",
|
||||||
# # -- "-auxdir=%f_aux",
|
# # -- "-auxdir=%f_aux",
|
||||||
# "-outdir=tex_aux_output"
|
# "-outdir=tex_aux_output"
|
||||||
# "-file-line-error"
|
# "-file-line-error"
|
||||||
# "-synctex=1"
|
# "-synctex=1"
|
||||||
# "-interaction=nonstopmode"
|
# "-interaction=nonstopmode"
|
||||||
# "-pv"
|
# "-pv"
|
||||||
# "%f"
|
# "%f"
|
||||||
# ];
|
# ];
|
||||||
# isContinuous = false;
|
# isContinuous = false;
|
||||||
# # -- "onSave = true" failed to work properly with large files like moderncv
|
# # -- "onSave = true" failed to work properly with large files like moderncv
|
||||||
# # -- it would not build properly until you delete all the intermediate files
|
# # -- it would not build properly until you delete all the intermediate files
|
||||||
# # -- onSave = true
|
# # -- onSave = true
|
||||||
# };
|
# };
|
||||||
# # --------------------------------
|
# # --------------------------------
|
||||||
# # -- END texlab main config
|
# # -- END texlab main config
|
||||||
# # -- if used with texmagic, disable this
|
# # -- if used with texmagic, disable this
|
||||||
# # --------------------------------
|
# # --------------------------------
|
||||||
# # --https://github.com/latex-lsp/texlab/wiki/Previewing
|
# # --https://github.com/latex-lsp/texlab/wiki/Previewing
|
||||||
# # -- https://github.com/f3fora/nvim-texlabconfig
|
# # -- https://github.com/f3fora/nvim-texlabconfig
|
||||||
# forwardSearch = {
|
# forwardSearch = {
|
||||||
# executable = "zathura";
|
# executable = "zathura";
|
||||||
# args = [
|
# args = [
|
||||||
# # -- This is for moving lines in nvim
|
# # -- This is for moving lines in nvim
|
||||||
# "--synctex-editor-command"
|
# "--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
|
# # -- 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"
|
# "[[nvim-texlabconfig -file '%%%{input}' -line %%%{line} -server ]] .. vim.v.servername"
|
||||||
# "--synctex-forward"
|
# "--synctex-forward"
|
||||||
# "%l:1:%f"
|
# "%l:1:%f"
|
||||||
# "%p"
|
# "%p"
|
||||||
# ];
|
# ];
|
||||||
# };
|
# };
|
||||||
# diagnosticsDelay = 300;
|
# diagnosticsDelay = 300;
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
clangd = {enable = true;};
|
clangd = {
|
||||||
lua-ls = {
|
enable = true;
|
||||||
enable = true;
|
};
|
||||||
extraOptions = {
|
lua-ls = {
|
||||||
settings = {
|
enable = true;
|
||||||
Lua = {
|
extraOptions = {
|
||||||
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 = {
|
settings = {
|
||||||
checkOnSave = true;
|
Lua = {
|
||||||
check = {
|
completion = {
|
||||||
command = "clippy";
|
callSnippet = "Replace";
|
||||||
};
|
};
|
||||||
# inlayHints = {
|
telemetry = {
|
||||||
# enable = true;
|
enabled = false;
|
||||||
# showParameterNames = true;
|
};
|
||||||
# parameterHintsPrefix = "<- ";
|
hint = {
|
||||||
# otherHintsPrefix = "=> ";
|
enable = true;
|
||||||
# };
|
};
|
||||||
procMacro = {
|
|
||||||
enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# keymaps = {
|
nil_ls = {
|
||||||
# silent = true;
|
enable = true;
|
||||||
# lspBuf = {
|
};
|
||||||
# gd = {
|
tsserver = {
|
||||||
# action = "definition";
|
enable = false;
|
||||||
# desc = "Goto Definition";
|
filetypes = [
|
||||||
# };
|
"javascript"
|
||||||
# gr = {
|
"javascriptreact"
|
||||||
# action = "references";
|
"typescript"
|
||||||
# desc = "Goto References";
|
"typescriptreact"
|
||||||
# };
|
];
|
||||||
# gD = {
|
extraOptions = {
|
||||||
# action = "declaration";
|
settings = {
|
||||||
# desc = "Goto Declaration";
|
javascript = {
|
||||||
# };
|
inlayHints = {
|
||||||
# gI = {
|
includeInlayEnumMemberValueHints = true;
|
||||||
# action = "implementation";
|
includeInlayFunctionLikeReturnTypeHints = true;
|
||||||
# desc = "Goto Implementation";
|
includeInlayFunctionParameterTypeHints = true;
|
||||||
# };
|
includeInlayParameterNameHints = "all";
|
||||||
# gT = {
|
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||||
# action = "type_definition";
|
includeInlayPropertyDeclarationTypeHints = true;
|
||||||
# desc = "Type Definition";
|
includeInlayVariableTypeHints = true;
|
||||||
# };
|
};
|
||||||
# K = {
|
};
|
||||||
# action = "hover";
|
typescript = {
|
||||||
# desc = "Hover";
|
inlayHints = {
|
||||||
# };
|
includeInlayEnumMemberValueHints = true;
|
||||||
# "<leader>cw" = {
|
includeInlayFunctionLikeReturnTypeHints = true;
|
||||||
# action = "workspace_symbol";
|
includeInlayFunctionParameterTypeHints = true;
|
||||||
# desc = "Workspace Symbol";
|
includeInlayParameterNameHints = "all";
|
||||||
# };
|
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||||
# "<leader>cr" = {
|
includeInlayPropertyDeclarationTypeHints = true;
|
||||||
# action = "rename";
|
includeInlayVariableTypeHints = true;
|
||||||
# desc = "Rename";
|
};
|
||||||
# };
|
};
|
||||||
# "<leader>ca" = {
|
};
|
||||||
# action = "code_action";
|
};
|
||||||
# desc = "Code Action";
|
};
|
||||||
# };
|
eslint = {
|
||||||
# "<C-k>" = {
|
enable = true;
|
||||||
# action = "signature_help";
|
};
|
||||||
# desc = "Signature Help";
|
pyright = {
|
||||||
# };
|
enable = true;
|
||||||
# };
|
};
|
||||||
# diagnostic = {
|
ruff-lsp = {
|
||||||
# "<leader>cd" = {
|
enable = true;
|
||||||
# action = "open_float";
|
};
|
||||||
# desc = "Line Diagnostics";
|
|
||||||
# };
|
rust-analyzer = {
|
||||||
# "[d" = {
|
enable = true;
|
||||||
# action = "goto_next";
|
installCargo = true;
|
||||||
# desc = "Next Diagnostic";
|
installRustc = true;
|
||||||
# };
|
settings = {
|
||||||
# "]d" = {
|
checkOnSave = true;
|
||||||
# action = "goto_prev";
|
check = {
|
||||||
# desc = "Previous Diagnostic";
|
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"
|
extraConfigLua = ''
|
||||||
|
local _border = "rounded"
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
|
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
|
||||||
vim.lsp.handlers.hover, {
|
vim.lsp.handlers.hover, {
|
||||||
border = _border
|
border = _border
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
|
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
|
||||||
vim.lsp.handlers.signature_help, {
|
vim.lsp.handlers.signature_help, {
|
||||||
border = _border
|
border = _border
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
vim.diagnostic.config{
|
vim.diagnostic.config{
|
||||||
float={border=_border}
|
float={border=_border}
|
||||||
};
|
};
|
||||||
|
|
||||||
require('lspconfig.ui.windows').default_options = {
|
require('lspconfig.ui.windows').default_options = {
|
||||||
border = _border
|
border = _border
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -224,88 +241,88 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
-- START texmagic, texlab
|
-- START texmagic, texlab
|
||||||
------------------------------
|
------------------------------
|
||||||
-- Below this one line is for texmagic only
|
-- Below this one line is for texmagic only
|
||||||
-- vim.g['tex_flavor'] = 'latex'
|
-- vim.g['tex_flavor'] = 'latex'
|
||||||
|
|
||||||
require('lspconfig').texlab.setup{
|
require('lspconfig').texlab.setup{
|
||||||
cmd = {"texlab"},
|
cmd = {"texlab"},
|
||||||
filetypes = {"tex", "plaintex", "bib"},
|
filetypes = {"tex", "plaintex", "bib"},
|
||||||
single_file_support = true,
|
single_file_support = true,
|
||||||
settings = {
|
settings = {
|
||||||
-- https://github.com/latex-lsp/texlab/wiki/Configuration
|
-- https://github.com/latex-lsp/texlab/wiki/Configuration
|
||||||
texlab = {
|
texlab = {
|
||||||
----------------------------------
|
----------------------------------
|
||||||
-- START for texmagic only
|
-- START for texmagic only
|
||||||
----------------------------------
|
----------------------------------
|
||||||
-- ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
-- ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
||||||
-- build = _G.TeXMagicBuildConfig,
|
-- build = _G.TeXMagicBuildConfig,
|
||||||
-- ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
-- ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
||||||
----------------------------------
|
----------------------------------
|
||||||
-- END for texmagic only
|
-- END for texmagic only
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- START texlab main config
|
-- START texlab main config
|
||||||
-- if used with texmagic, disable this
|
-- if used with texmagic, disable this
|
||||||
--------------------------------
|
--------------------------------
|
||||||
auxDirectory = "tex_aux_output",
|
auxDirectory = "tex_aux_output",
|
||||||
rootDirectory = nil,
|
rootDirectory = nil,
|
||||||
build = {
|
build = {
|
||||||
-- forwardSearchAfter = true,
|
-- forwardSearchAfter = true,
|
||||||
executable = "latexmk",
|
executable = "latexmk",
|
||||||
args = {
|
args = {
|
||||||
"-xelatex",
|
"-xelatex",
|
||||||
"-verbose",
|
"-verbose",
|
||||||
-- "-outdir=%f_output",
|
-- "-outdir=%f_output",
|
||||||
-- "-auxdir=%f_aux",
|
-- "-auxdir=%f_aux",
|
||||||
"-outdir=tex_aux_output",
|
"-outdir=tex_aux_output",
|
||||||
"-file-line-error",
|
"-file-line-error",
|
||||||
"-synctex=1",
|
"-synctex=1",
|
||||||
"-interaction=nonstopmode",
|
"-interaction=nonstopmode",
|
||||||
"-pv",
|
"-pv",
|
||||||
"%f",
|
"%f",
|
||||||
},
|
},
|
||||||
isContinuous = false,
|
isContinuous = false,
|
||||||
-- "onSave = true" failed to work properly with large files like moderncv
|
-- "onSave = true" failed to work properly with large files like moderncv
|
||||||
-- it would not build properly until you delete all the intermediate files
|
-- it would not build properly until you delete all the intermediate files
|
||||||
-- onSave = true
|
-- onSave = true
|
||||||
},
|
},
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- END texlab main config
|
-- END texlab main config
|
||||||
-- if used with texmagic, disable this
|
-- if used with texmagic, disable this
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--https://github.com/latex-lsp/texlab/wiki/Previewing
|
--https://github.com/latex-lsp/texlab/wiki/Previewing
|
||||||
-- https://github.com/f3fora/nvim-texlabconfig
|
-- https://github.com/f3fora/nvim-texlabconfig
|
||||||
forwardSearch = {
|
forwardSearch = {
|
||||||
executable = "zathura",
|
executable = "zathura",
|
||||||
args = {
|
args = {
|
||||||
-- This is for moving lines in nvim
|
-- This is for moving lines in nvim
|
||||||
'--synctex-editor-command',
|
'--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
|
-- 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,
|
[[nvim-texlabconfig -file '%%%{input}' -line %%%{line} -server ]] .. vim.v.servername,
|
||||||
'--synctex-forward',
|
'--synctex-forward',
|
||||||
'%l:1:%f',
|
'%l:1:%f',
|
||||||
'%p',
|
'%p',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
diagnosticsDelay = 300,
|
diagnosticsDelay = 300,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- compile laTeX keymap
|
-- compile laTeX keymap
|
||||||
vim.keymap.set('n', '<leader>l', ':TexlabBuild<CR>' )
|
vim.keymap.set('n', '<leader>l', ':TexlabBuild<CR>' )
|
||||||
-- forwardSearch
|
-- forwardSearch
|
||||||
vim.keymap.set('n', '<leader>k', ':TexlabForward<CR>' )
|
vim.keymap.set('n', '<leader>k', ':TexlabForward<CR>' )
|
||||||
-- if lsp failed to start, start manually
|
-- if lsp failed to start, start manually
|
||||||
vim.keymap.set('n', '<leader>j', ':LspStart<CR>' )
|
vim.keymap.set('n', '<leader>j', ':LspStart<CR>' )
|
||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
-- END texmagic, texlab
|
-- END texmagic, texlab
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins = {
|
||||||
lualine = {
|
lualine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,86 +1,82 @@
|
||||||
# vim: ts=4:sts=0:sw=0:noet
|
{ pkgs, pkgs-stable, ... }:
|
||||||
{
|
{
|
||||||
pkgs
|
plugins = {
|
||||||
, pkgs-stable
|
neorg = {
|
||||||
, ... }:
|
enable = true;
|
||||||
{
|
# package = pkgs-stable.vimPlugins.neorg;
|
||||||
plugins = {
|
package = pkgs.vimPlugins.neorg;
|
||||||
neorg = {
|
modules = {
|
||||||
enable = true;
|
"core.defaults" = { }; # -- Loads default behaviour
|
||||||
# package = pkgs-stable.vimPlugins.neorg;
|
"core.summary" = { };
|
||||||
package = pkgs.vimPlugins.neorg;
|
"core.export" = { };
|
||||||
modules = {
|
"core.export.markdown" = { };
|
||||||
"core.defaults" = {}; # -- Loads default behaviour
|
"core.concealer" = {
|
||||||
"core.summary" = {};
|
config = {
|
||||||
"core.export" = {};
|
folds = false;
|
||||||
"core.export.markdown" = {};
|
};
|
||||||
"core.concealer" = {
|
}; # -- Adds pretty icons to your documents
|
||||||
config = {
|
"core.dirman" = {
|
||||||
folds = false;
|
config = {
|
||||||
};
|
workspaces = {
|
||||||
}; #-- Adds pretty icons to your documents
|
n = "~/neorg/notes";
|
||||||
"core.dirman" = {
|
e = "~/neorg/english";
|
||||||
config = {
|
l = "~/neorg/letter";
|
||||||
workspaces = {
|
g = "~/neorg/grammar";
|
||||||
n = "~/neorg/notes";
|
p = "~/neorg/perl";
|
||||||
e = "~/neorg/english";
|
m = "~/neorg/misc";
|
||||||
l = "~/neorg/letter";
|
# nvim = "~/.config/nvim/NeorgNvimNotes";
|
||||||
g = "~/neorg/grammar";
|
};
|
||||||
p = "~/neorg/perl";
|
default_workspace = "m";
|
||||||
m = "~/neorg/misc";
|
};
|
||||||
# nvim = "~/.config/nvim/NeorgNvimNotes";
|
};
|
||||||
};
|
"core.keybinds" = {
|
||||||
default_workspace = "m";
|
config = {
|
||||||
};
|
default_keybinds = true;
|
||||||
};
|
hook.__raw = ''
|
||||||
"core.keybinds" = {
|
function(keybinds)
|
||||||
config = {
|
keybinds.unmap("norg", "i", "<M-CR>")
|
||||||
default_keybinds = true;
|
keybinds.remap_event("norg", "i", "<S-CR>", "core.itero.next-iteration", "<CR>")
|
||||||
hook.__raw = ''
|
end
|
||||||
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
|
||||||
};
|
----------------------------------------------------
|
||||||
extraConfigLua = ''
|
-- vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, {
|
||||||
----------------------------------------------------
|
-- pattern = '*.norg',
|
||||||
-- START Neorg config
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
----------------------------------------------------
|
pattern = 'norg',
|
||||||
-- vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, {
|
callback = function()
|
||||||
-- pattern = '*.norg',
|
vim.opt.formatoptions:remove('r')
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.opt.formatoptions:remove('o')
|
||||||
pattern = 'norg',
|
|
||||||
callback = function()
|
|
||||||
vim.opt.formatoptions:remove('r')
|
|
||||||
vim.opt.formatoptions:remove('o')
|
|
||||||
|
|
||||||
-- https://github.com/nvim-neorg/neorg/discussions/1066
|
-- https://github.com/nvim-neorg/neorg/discussions/1066
|
||||||
vim.opt.conceallevel = 2
|
vim.opt.conceallevel = 2
|
||||||
vim.keymap.set( 'n', '<leader>Nt', function()
|
vim.keymap.set( 'n', '<leader>Nt', function()
|
||||||
if vim.opt.conceallevel:get() == 2 then
|
if vim.opt.conceallevel:get() == 2 then
|
||||||
vim.opt.conceallevel = 0
|
vim.opt.conceallevel = 0
|
||||||
elseif vim.opt.conceallevel:get() == 0 then
|
elseif vim.opt.conceallevel:get() == 0 then
|
||||||
vim.opt.conceallevel = 2
|
vim.opt.conceallevel = 2
|
||||||
end
|
end
|
||||||
vim.cmd('Neorg toggle-concealer')
|
vim.cmd('Neorg toggle-concealer')
|
||||||
end, { desc = 'Neorg toggle-concealer and conceallevel' })
|
end, { desc = 'Neorg toggle-concealer and conceallevel' })
|
||||||
-- use this insteand: ['core.concealer'] = { config = { folds = false }, },
|
-- use this insteand: ['core.concealer'] = { config = { folds = false }, },
|
||||||
-- vim.opt.foldlevelstart = 99
|
-- 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>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' })
|
vim.keymap.set( 'n', '<leader>NT', function() vim.cmd.Neorg('toc') end, { desc = 'Table of Content' })
|
||||||
end,
|
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>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>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>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)' })
|
vim.keymap.set( 'n', '<leader>Ne', function() vim.cmd('Neorg workspace e') end, { desc = 'Neorg workspace e (neorg-english)' })
|
||||||
----------------------------------------------------
|
----------------------------------------------------
|
||||||
-- END Neorg config
|
-- END Neorg config
|
||||||
----------------------------------------------------
|
----------------------------------------------------
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins = {
|
||||||
nvim-tree = {
|
nvim-tree = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins = {
|
||||||
sleuth = {
|
sleuth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,190 +1,190 @@
|
||||||
{
|
{
|
||||||
plugins.telescope = {
|
plugins.telescope = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extensions = {
|
extensions = {
|
||||||
fzf-native = {
|
fzf-native = {
|
||||||
enable = true;
|
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
# 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:
|
# project-nvim = {
|
||||||
defaults = {
|
# enable = true;
|
||||||
|
# };
|
||||||
|
# ui-select = {
|
||||||
|
# settings = {
|
||||||
|
# specific_opts = {
|
||||||
|
# codeactions = true;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
undo = {
|
||||||
|
enable = true;
|
||||||
mappings = {
|
mappings = {
|
||||||
i = {
|
i = {
|
||||||
"<esc>" = {
|
"<cr>" = "yank_additions";
|
||||||
__raw = ''
|
"<s-cr>" = "yank_deletions";
|
||||||
function(...)
|
"<c-cr>" = "restore";
|
||||||
return require("telescope.actions").close(...)
|
};
|
||||||
end'';
|
n = {
|
||||||
};
|
"y" = "yank_additions";
|
||||||
|
"Y" = "yank_deletions";
|
||||||
|
"u" = "restore";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
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 = [
|
# 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 = {
|
||||||
mode = "n";
|
mappings = {
|
||||||
key = "<leader>fp";
|
i = {
|
||||||
action = "<cmd>Telescope projects<CR>";
|
"<esc>" = {
|
||||||
options = {
|
__raw = ''
|
||||||
desc = "Projects";
|
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 = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>fp";
|
||||||
|
action = "<cmd>Telescope projects<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Projects";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>sd";
|
key = "<leader>sd";
|
||||||
action = "<cmd>Telescope diagnostics bufnr=0<cr>";
|
action = "<cmd>Telescope diagnostics bufnr=0<cr>";
|
||||||
options = {
|
options = {
|
||||||
desc = "Document diagnostics";
|
desc = "Document diagnostics";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>st";
|
key = "<leader>st";
|
||||||
action = "<cmd>TodoTelescope<cr>";
|
action = "<cmd>TodoTelescope<cr>";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
desc = "Todo (Telescope)";
|
desc = "Todo (Telescope)";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
# {
|
# {
|
||||||
# mode = "n";
|
# mode = "n";
|
||||||
# key = "<leader>,";
|
# key = "<leader>,";
|
||||||
# action = "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>";
|
# action = "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>";
|
||||||
# options = {
|
# options = {
|
||||||
# desc = "Switch Buffer";
|
# desc = "Switch Buffer";
|
||||||
# };
|
# };
|
||||||
# }
|
# }
|
||||||
];
|
];
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
local telescope = require('telescope')
|
local telescope = require('telescope')
|
||||||
telescope.setup{
|
telescope.setup{
|
||||||
pickers = {
|
pickers = {
|
||||||
colorscheme = {
|
colorscheme = {
|
||||||
enable_preview = true
|
enable_preview = true
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'';
|
}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins = {
|
||||||
treesitter = {
|
treesitter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
incrementalSelection = {
|
incrementalSelection = {
|
||||||
enable = true;
|
enable = true;
|
||||||
keymaps = {
|
keymaps = {
|
||||||
initSelection = "g<space><space>";
|
initSelection = "g<space><space>";
|
||||||
nodeIncremental = "g<space><space>";
|
nodeIncremental = "g<space><space>";
|
||||||
scopeIncremental = "<c-s>";
|
scopeIncremental = "<c-s>";
|
||||||
nodeDecremental = "g<space>m";
|
nodeDecremental = "g<space>m";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
plugins = {
|
plugins = {
|
||||||
which-key = {
|
which-key = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
110
config/sets.nix
110
config/sets.nix
|
|
@ -1,73 +1,71 @@
|
||||||
# The line beneath this is called `modeline`. See `:help modeline`
|
|
||||||
# vim: ts=4:sts=0:sw=0:noet
|
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
globals = {
|
globals = {
|
||||||
mapleader = " ";
|
mapleader = " ";
|
||||||
maplocalleader = " ";
|
maplocalleader = " ";
|
||||||
};
|
};
|
||||||
options = {
|
options = {
|
||||||
relativenumber = true;
|
relativenumber = true;
|
||||||
splitbelow = true;
|
splitbelow = true;
|
||||||
redrawtime = 5000;
|
redrawtime = 5000;
|
||||||
|
|
||||||
# new split to the right
|
# new split to the right
|
||||||
splitright = true;
|
splitright = true;
|
||||||
|
|
||||||
# show hidden characters
|
# show hidden characters
|
||||||
list = true;
|
list = true;
|
||||||
|
|
||||||
# don't break words on the edge
|
# don't break words on the edge
|
||||||
linebreak = true;
|
linebreak = true;
|
||||||
wrap = true;
|
wrap = true;
|
||||||
# length of an actual \t character:
|
# length of an actual \t character:
|
||||||
# https://stackoverflow.com/questions/191201/indenting-comments-to-match-code-in-vim
|
# https://stackoverflow.com/questions/191201/indenting-comments-to-match-code-in-vim
|
||||||
smartindent = false;
|
smartindent = false;
|
||||||
# length to use when shifting text (eg. <<, >> and == commands)
|
# length to use when shifting text (eg. <<, >> and == commands)
|
||||||
|
|
||||||
tabstop=4;
|
tabstop = 4;
|
||||||
shiftwidth = 0;
|
shiftwidth = 0;
|
||||||
|
|
||||||
expandtab = false;
|
expandtab = false;
|
||||||
autoindent = true;
|
autoindent = true;
|
||||||
# Set highlight on search
|
# Set highlight on search
|
||||||
hlsearch = false;
|
hlsearch = false;
|
||||||
|
|
||||||
# Make line numbers default
|
# Make line numbers default
|
||||||
number = true;
|
number = true;
|
||||||
|
|
||||||
# Enable mouse mode
|
# Enable mouse mode
|
||||||
mouse = "a";
|
mouse = "a";
|
||||||
|
|
||||||
# Sync clipboard between OS and Neovim.
|
# Sync clipboard between OS and Neovim.
|
||||||
# Remove this option if you want your OS clipboard to remain independent.
|
# Remove this option if you want your OS clipboard to remain independent.
|
||||||
# See `:help 'clipboard'`
|
# See `:help 'clipboard'`
|
||||||
# vim.o.clipboard = 'unnamedplus' -- REMOVED BY ME
|
# vim.o.clipboard = 'unnamedplus' -- REMOVED BY ME
|
||||||
|
|
||||||
# Enable break indent
|
# Enable break indent
|
||||||
breakindent = true;
|
breakindent = true;
|
||||||
|
|
||||||
# Save undo history
|
# Save undo history
|
||||||
# vim.o.undofile = true -- REMOVED BY ME
|
# vim.o.undofile = true -- REMOVED BY ME
|
||||||
|
|
||||||
# Case insensitive searching UNLESS /C or capital in search
|
# Case insensitive searching UNLESS /C or capital in search
|
||||||
ignorecase = true;
|
ignorecase = true;
|
||||||
smartcase = true;
|
smartcase = true;
|
||||||
|
|
||||||
# Keep signcolumn on by default
|
# Keep signcolumn on by default
|
||||||
signcolumn = "yes";
|
signcolumn = "yes";
|
||||||
|
|
||||||
# Decrease update time
|
# Decrease update time
|
||||||
updatetime = 250;
|
updatetime = 250;
|
||||||
timeout = true;
|
timeout = true;
|
||||||
# timeoutlen = 1000; # time of valid keypress like for leader key in millisecond
|
# timeoutlen = 1000; # time of valid keypress like for leader key in millisecond
|
||||||
timeoutlen = 300; # lower to 300 in favor of which-key plugins
|
timeoutlen = 300; # lower to 300 in favor of which-key plugins
|
||||||
|
|
||||||
# Set completeopt to have a better completion experience
|
# Set completeopt to have a better completion experience
|
||||||
completeopt = "menuone,noselect";
|
completeopt = "menuone,noselect";
|
||||||
|
|
||||||
# NOTE: You should make sure your terminal supports this
|
# NOTE: You should make sure your terminal supports this
|
||||||
termguicolors = true;
|
termguicolors = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue