configure astrocore more
This commit is contained in:
parent
dc02604cdf
commit
e0dfc1e2d1
6 changed files with 112 additions and 13 deletions
|
|
@ -1,12 +1,12 @@
|
|||
{pkgs, lib,...}: let
|
||||
inherit lib.nixvim.lua.toLuaObject;
|
||||
inherit (lib.nixvim.lua) toLuaObject;
|
||||
|
||||
options = {
|
||||
features = {
|
||||
large_buf = { size = 1024 * 256; lines = 10000 }; # set global limits for large files for disabling features like treesitter
|
||||
large_buf = { size = 1024 * 256; lines = 10000; }; # set global limits for large files for disabling features like treesitter
|
||||
autopairs = true; # enable autopairs at start
|
||||
cmp = true; # enable completion at start
|
||||
diagnostics = { virtual_text = true; virtual_lines = false }; # diagnostic settings on startup
|
||||
diagnostics = { virtual_text = true; virtual_lines = false; }; # diagnostic settings on startup
|
||||
highlighturl = true; # highlight URLs at start
|
||||
notifications = true; # enable notifications at start
|
||||
};
|
||||
|
|
@ -28,11 +28,45 @@
|
|||
# [".*/etc/foo/.*"] = "fooscript";
|
||||
# };
|
||||
# };
|
||||
rooter = {
|
||||
# list of detectors in order of prevalence, elements can be:
|
||||
# "lsp" : lsp detection
|
||||
# string[] : a list of directory patterns to look for
|
||||
# fun(bufnr: integer): string|string[] : a function that takes a buffer number and outputs detected roots
|
||||
detector = [
|
||||
"lsp" # highest priority is getting workspace from running language servers
|
||||
[ ".git" "_darcs" ".hg" ".bzr" ".svn" ] # next check for a version controlled parent directory
|
||||
[ "lua" "MakeFile" "package.json" ] # lastly check for known project root files
|
||||
];
|
||||
# ignore things from root detection
|
||||
ignore = {
|
||||
servers = []; # list of language server names to ignore (Ex. { "efm" })
|
||||
dirs = []; # list of directory patterns (Ex. { "~/.cargo/*" })
|
||||
};
|
||||
# automatically update working directory (update manually with `:AstroRoot`)
|
||||
autochdir = false;
|
||||
# scope of working directory to change ("global"|"tab"|"win")
|
||||
scope = "global";
|
||||
# show notification on every working directory change
|
||||
notify = true;
|
||||
};
|
||||
sessions = {
|
||||
autosave = {
|
||||
last = true; # autosave last session
|
||||
cwd = true; # auosave session for each working dir
|
||||
};
|
||||
# Patterns to ignore when saving sessions
|
||||
ignore = {
|
||||
dirs = []; # working directories to ignore sessions in
|
||||
filetypes = [ "gitcommit" "gitrebase" ]; # filetypes to ignore sessions
|
||||
buftypes = []; # buffer types to ignore sessions
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
extraPlugins = [pkgs.vimPlugins.astrocore];
|
||||
|
||||
extraConfigLua = /*lua*/ ''
|
||||
require('astrocore').setup(${toLuaObject options})
|
||||
''
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue