File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed
tests/test-sources/plugins/bufferlines Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 55 ...
66} :
77let
8- inherit ( lib ) mkEnableOption genAttrs ;
98 inherit ( lib . nixvim ) defaultNullOpts nixvimTypes ;
109 types = nixvimTypes ;
1110
@@ -112,7 +111,6 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin config {
112111 "sortBy"
113112 "diagnostics"
114113 "diagnosticsIndicator"
115- "diagnosticsUpdateInInsert"
116114 "offsets"
117115 [
118116 "groups"
@@ -402,7 +400,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin config {
402400 } ;
403401
404402 hover = {
405- enabled = mkEnableOption "hover" ;
403+ enabled = lib . mkEnableOption "hover" ;
406404
407405 reveal = defaultNullOpts . mkListOf types . str [ ] "reveal" ;
408406
@@ -424,14 +422,26 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin config {
424422 optionSnakeCase
425423 ) ( oldHighlightOptions ++ [ "truncMarker" ] ) ;
426424 in
427- genAttrs newHighlightsOptions (
425+ lib . genAttrs newHighlightsOptions (
428426 name :
429427 defaultNullOpts . mkHighlight { } null ''
430428 Highlight group definition for ${ name } .
431429 ''
432430 ) ;
433431 } ;
434432
433+ extraOptions = {
434+ diagnosticsUpdateInInsert = lib . mkOption {
435+ type = types . bool ;
436+ default = false ;
437+ description = ''
438+ Whether to enable diagnostics update in insert mode.
439+
440+ Only applies when `coc` is selected in option `plugins.settings.options.diagnostic`.
441+ '' ;
442+ } ;
443+ } ;
444+
435445 settingsExample = {
436446 options = {
437447 mode = "buffers" ;
@@ -574,6 +584,12 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin config {
574584 } ;
575585
576586 extraConfig = cfg : {
587+ extraConfigLua =
588+ lib . mkIf cfg . diagnosticsUpdateInInsert # Lua
589+ ''
590+ vim.diagnostic.config { update_in_insert = true }
591+ '' ;
592+
577593 extraPlugins = with pkgs . vimPlugins ; [
578594 cfg . package
579595 nvim-web-devicons
Original file line number Diff line number Diff line change 4747 defaults = {
4848 plugins . bufferline = {
4949 enable = true ;
50+ diagnosticsUpdateInInsert = true ;
51+
5052 settings = {
5153 options = {
5254 mode = "buffers" ;
You can’t perform that action at this time.
0 commit comments