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})
|
||||
''
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
7
plugins/astroui.nix
Normal file
7
plugins/astroui.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{pkgs, lib, ...}:{
|
||||
extraPlugins = [pkgs.vimPlugins.astroui];
|
||||
|
||||
extraConfigLua = /*lua*/ ''
|
||||
require('astroui').setup({});
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,5 +1,12 @@
|
|||
{
|
||||
imports = [
|
||||
./treesitter.nix
|
||||
];
|
||||
{lib, ...}: let
|
||||
definitions = lib.attrNames (
|
||||
lib.filterAttrs
|
||||
(filename: kind:
|
||||
filename != "default.nix"
|
||||
&& (kind == "regular" || kind == "directory")
|
||||
)
|
||||
(builtins.readDir ./.)
|
||||
);
|
||||
in {
|
||||
imports = map (file: import ./${file}) definitions;
|
||||
}
|
||||
|
|
|
|||
28
plugins/lsp/default.nix
Normal file
28
plugins/lsp/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{pkgs, ...}@args:{
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
|
||||
servers = {
|
||||
bashls.enable = true;
|
||||
cssls.enable = true;
|
||||
docker_compose_language_service.enable = true;
|
||||
dockerls.enable = true;
|
||||
helm_ls.enable = true;
|
||||
html.enable = true;
|
||||
jsonls.enable = true;
|
||||
lua_ls.enable = true;
|
||||
nginx_language_server.enable = true;
|
||||
nixd.enable = true;
|
||||
pyright.enable = true;
|
||||
yamlls.enable = true;
|
||||
clangd.enable = true;
|
||||
marksman.enable = true;
|
||||
texlab.enable = true;
|
||||
lemminx.enable = true; # XML
|
||||
|
||||
java_language_server.enable = false;
|
||||
zls.enable = false;
|
||||
rust_analyzer.enable = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue