mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-01 19:11:15 +00:00
feat: make visible borders optional
This commit is contained in:
parent
eaab87d151
commit
cf48beb8e6
5 changed files with 23 additions and 2 deletions
|
@ -200,12 +200,13 @@ in {
|
|||
|
||||
local cmp = require'cmp'
|
||||
cmp.setup({
|
||||
${optionalString (config.vim.ui.borders.enable) ''
|
||||
-- explicitly enabled by setting ui.borders.enable = true
|
||||
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(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
''}
|
||||
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
|
|
|
@ -16,6 +16,11 @@ in {
|
|||
|
||||
vim.luaConfigRC.lspconfig = nvim.dag.entryAfter ["lsp-setup"] ''
|
||||
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
|
||||
./colorizer
|
||||
./illuminate
|
||||
./borders
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue