mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 19:12:38 +00:00 
			
		
		
		
	treewide: rewrite autocompletion module and related stuff (#404)
* modules/completion: rewrite
* treewide: remove vsnip, add luasnip
* nvim-cmp: add default sorting
* nvim-cmp: load after luasnip
* lib: fix docs for mergelessListOf
* docs: add changelog entires for rewrite
* deprecations: add rewrite deprecations
* nvim-cmp: clarify in format description
* docs: fix option reference in release notes
* treewide: remove reduant `// {default = false;}`s
* luasnip: add missing `{option}` for option reference
* deprecations: add entry for vsnip
* nvim-autopairs: use multiline string
* nvim-dap: use outer attribute
	
	
This commit is contained in:
		
					parent
					
						
							
								ef413736e9
							
						
					
				
			
			
				commit
				
					
						7dbd1cd8d1
					
				
			
		
					 33 changed files with 512 additions and 483 deletions
				
			
		|  | @ -16,57 +16,61 @@ | |||
| in { | ||||
|   config = mkMerge [ | ||||
|     (mkIf cfg.enable { | ||||
|       vim.startPlugins = ["nvim-dap"]; | ||||
|       vim = { | ||||
|         startPlugins = ["nvim-dap"]; | ||||
| 
 | ||||
|       vim.pluginRC = | ||||
|         { | ||||
|           # TODO customizable keymaps | ||||
|           nvim-dap = entryAnywhere '' | ||||
|             local dap = require("dap") | ||||
|             vim.fn.sign_define("DapBreakpoint", { text = "🛑", texthl = "ErrorMsg", linehl = "", numhl = "" }) | ||||
|           ''; | ||||
|         } | ||||
|         // mapAttrs (_: v: (entryAfter ["nvim-dap"] v)) cfg.sources; | ||||
|         pluginRC = | ||||
|           { | ||||
|             # TODO customizable keymaps | ||||
|             nvim-dap = entryAnywhere '' | ||||
|               local dap = require("dap") | ||||
|               vim.fn.sign_define("DapBreakpoint", { text = "🛑", texthl = "ErrorMsg", linehl = "", numhl = "" }) | ||||
|             ''; | ||||
|           } | ||||
|           // mapAttrs (_: v: (entryAfter ["nvim-dap"] v)) cfg.sources; | ||||
| 
 | ||||
|       vim.maps.normal = mkMerge [ | ||||
|         (mkSetLuaBinding mappings.continue "require('dap').continue") | ||||
|         (mkSetLuaBinding mappings.restart "require('dap').restart") | ||||
|         (mkSetLuaBinding mappings.terminate "require('dap').terminate") | ||||
|         (mkSetLuaBinding mappings.runLast "require('dap').run_last") | ||||
|         maps.normal = mkMerge [ | ||||
|           (mkSetLuaBinding mappings.continue "require('dap').continue") | ||||
|           (mkSetLuaBinding mappings.restart "require('dap').restart") | ||||
|           (mkSetLuaBinding mappings.terminate "require('dap').terminate") | ||||
|           (mkSetLuaBinding mappings.runLast "require('dap').run_last") | ||||
| 
 | ||||
|         (mkSetLuaBinding mappings.toggleRepl "require('dap').repl.toggle") | ||||
|         (mkSetLuaBinding mappings.hover "require('dap.ui.widgets').hover") | ||||
|         (mkSetLuaBinding mappings.toggleBreakpoint "require('dap').toggle_breakpoint") | ||||
|           (mkSetLuaBinding mappings.toggleRepl "require('dap').repl.toggle") | ||||
|           (mkSetLuaBinding mappings.hover "require('dap.ui.widgets').hover") | ||||
|           (mkSetLuaBinding mappings.toggleBreakpoint "require('dap').toggle_breakpoint") | ||||
| 
 | ||||
|         (mkSetLuaBinding mappings.runToCursor "require('dap').run_to_cursor") | ||||
|         (mkSetLuaBinding mappings.stepInto "require('dap').step_into") | ||||
|         (mkSetLuaBinding mappings.stepOut "require('dap').step_out") | ||||
|         (mkSetLuaBinding mappings.stepOver "require('dap').step_over") | ||||
|         (mkSetLuaBinding mappings.stepBack "require('dap').step_back") | ||||
|           (mkSetLuaBinding mappings.runToCursor "require('dap').run_to_cursor") | ||||
|           (mkSetLuaBinding mappings.stepInto "require('dap').step_into") | ||||
|           (mkSetLuaBinding mappings.stepOut "require('dap').step_out") | ||||
|           (mkSetLuaBinding mappings.stepOver "require('dap').step_over") | ||||
|           (mkSetLuaBinding mappings.stepBack "require('dap').step_back") | ||||
| 
 | ||||
|         (mkSetLuaBinding mappings.goUp "require('dap').up") | ||||
|         (mkSetLuaBinding mappings.goDown "require('dap').down") | ||||
|       ]; | ||||
|           (mkSetLuaBinding mappings.goUp "require('dap').up") | ||||
|           (mkSetLuaBinding mappings.goDown "require('dap').down") | ||||
|         ]; | ||||
|       }; | ||||
|     }) | ||||
|     (mkIf (cfg.enable && cfg.ui.enable) { | ||||
|       vim.startPlugins = ["nvim-dap-ui" "nvim-nio"]; | ||||
|       vim = { | ||||
|         startPlugins = ["nvim-dap-ui" "nvim-nio"]; | ||||
| 
 | ||||
|       vim.pluginRC.nvim-dap-ui = entryAfter ["nvim-dap"] ('' | ||||
|           local dapui = require("dapui") | ||||
|           dapui.setup() | ||||
|         '' | ||||
|         + optionalString cfg.ui.autoStart '' | ||||
|           dap.listeners.after.event_initialized["dapui_config"] = function() | ||||
|             dapui.open() | ||||
|           end | ||||
|           dap.listeners.before.event_terminated["dapui_config"] = function() | ||||
|             dapui.close() | ||||
|           end | ||||
|           dap.listeners.before.event_exited["dapui_config"] = function() | ||||
|             dapui.close() | ||||
|           end | ||||
|         ''); | ||||
|       vim.maps.normal = mkSetLuaBinding mappings.toggleDapUI "require('dapui').toggle"; | ||||
|         pluginRC.nvim-dap-ui = entryAfter ["nvim-dap"] ('' | ||||
|             local dapui = require("dapui") | ||||
|             dapui.setup() | ||||
|           '' | ||||
|           + optionalString cfg.ui.autoStart '' | ||||
|             dap.listeners.after.event_initialized["dapui_config"] = function() | ||||
|               dapui.open() | ||||
|             end | ||||
|             dap.listeners.before.event_terminated["dapui_config"] = function() | ||||
|               dapui.close() | ||||
|             end | ||||
|             dap.listeners.before.event_exited["dapui_config"] = function() | ||||
|               dapui.close() | ||||
|             end | ||||
|           ''); | ||||
|         maps.normal = mkSetLuaBinding mappings.toggleDapUI "require('dapui').toggle"; | ||||
|       }; | ||||
|     }) | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 diniamo
				diniamo