Skip to content

feat: defaul cmd can now be a function that returns a cmd string#23

Open
noby-y wants to merge 2 commits intopohlrabi404:mainfrom
noby-y:main
Open

feat: defaul cmd can now be a function that returns a cmd string#23
noby-y wants to merge 2 commits intopohlrabi404:mainfrom
noby-y:main

Conversation

@noby-y
Copy link

@noby-y noby-y commented Feb 7, 2026

this simple change makes it possible to define custom functions for default cmds. as an example:

default = function()
	local relative_path = ' ' .. vim.fn.expand('%:.')
	local binary_path = ' ' .. vim.fn.expand('%:.:r')

	local commands = {
		python = 'python' .. relative_path,
		c = 'gcc -o' .. binary_path .. relative_path,
	}

	return commands[vim.bo.filetype]
end,
image

@noby-y
Copy link
Author

noby-y commented Feb 7, 2026

how did i misspell the pr :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant