mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +00:00
feat: make visible borders optional
This commit is contained in:
parent
9e23ff355e
commit
0951114a29
5 changed files with 23 additions and 2 deletions
|
@ -192,12 +192,13 @@ in {
|
||||||
|
|
||||||
local cmp = require'cmp'
|
local cmp = require'cmp'
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
|
${optionalString (config.vim.ui.borders.enable) ''
|
||||||
|
-- explicitly enabled by setting ui.borders.enable = true
|
||||||
window = {
|
window = {
|
||||||
-- TODO: at some point, those need to be optional
|
|
||||||
-- but first nvim cmp module needs to be detached from "cfg.autocomplete"
|
|
||||||
completion = cmp.config.window.bordered(),
|
completion = cmp.config.window.bordered(),
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered(),
|
||||||
},
|
},
|
||||||
|
''}
|
||||||
|
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
|
|
|
@ -16,6 +16,11 @@ in {
|
||||||
|
|
||||||
vim.luaConfigRC.lspconfig = nvim.dag.entryAfter ["lsp-setup"] ''
|
vim.luaConfigRC.lspconfig = nvim.dag.entryAfter ["lsp-setup"] ''
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
|
|
||||||
|
${
|
||||||
|
# TODO: make border style configurable
|
||||||
|
optionalString (config.vim.ui.borders.enable) "require('lspconfig.ui.windows').default_options.border = 'single'"
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
9
modules/ui/borders/borders.nix
Normal file
9
modules/ui/borders/borders.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib) mkEnableOption mkOption;
|
||||||
|
in {
|
||||||
|
options.vim.ui.borders = {
|
||||||
|
enable = mkEnableOption "visible borders for most windows";
|
||||||
|
|
||||||
|
# TODO: make per-plugin borders configurable
|
||||||
|
};
|
||||||
|
}
|
5
modules/ui/borders/default.nix
Normal file
5
modules/ui/borders/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
_: {
|
||||||
|
imports = [
|
||||||
|
./borders.nix
|
||||||
|
];
|
||||||
|
}
|
|
@ -6,5 +6,6 @@ _: {
|
||||||
./smartcolumn
|
./smartcolumn
|
||||||
./colorizer
|
./colorizer
|
||||||
./illuminate
|
./illuminate
|
||||||
|
./borders
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue