diff --git a/README.md b/README.md index ed79030..149f49f 100644 --- a/README.md +++ b/README.md @@ -33,53 +33,8 @@ Requirements: } ``` -## Configuration - -> [!IMPORTANT] -> -> If you need more info look `:h gopher.nvim` - -**Take a look at default options (might be a bit outdated, look `:h gopher.nvim-config`)** - -```lua -require("gopher").setup { - -- log level, you might consider using DEBUG or TRACE for debugging the plugin - log_level = vim.log.levels.INFO, - - -- timeout for running internal commands - timeout = 2000, - - commands = { - go = "go", - gomodifytags = "gomodifytags", - gotests = "gotests", - impl = "impl", - iferr = "iferr", - }, - gotests = { - -- gotests doesn't have template named "default" so this plugin uses "default" to set the default template - template = "default", - -- path to a directory containing custom test code templates - template_dir = nil, - -- switch table tests from using slice to map (with test name for the key) - named = false, - }, - gotag = { - transform = "snakecase", - -- default tags to add to struct fields - default_tag = "json", - }, - iferr = { - -- choose a custom error message - message = nil, - }, -} -``` - ## Features - -
Install plugin's go deps @@ -230,6 +185,49 @@ require("gopher").setup { ```
+## Configuration + +> [!IMPORTANT] +> +> If you need more info look `:h gopher.nvim` + +**Take a look at default options (might be a bit outdated, look `:h gopher.nvim-config`)** + +```lua +require("gopher").setup { + -- log level, you might consider using DEBUG or TRACE for debugging the plugin + log_level = vim.log.levels.INFO, + + -- timeout for running internal commands + timeout = 2000, + + commands = { + go = "go", + gomodifytags = "gomodifytags", + gotests = "gotests", + impl = "impl", + iferr = "iferr", + }, + gotests = { + -- gotests doesn't have template named "default" so this plugin uses "default" to set the default template + template = "default", + -- path to a directory containing custom test code templates + template_dir = nil, + -- switch table tests from using slice to map (with test name for the key) + named = false, + }, + gotag = { + transform = "snakecase", + -- default tags to add to struct fields + default_tag = "json", + }, + iferr = { + -- choose a custom error message + message = nil, + }, +} +``` + ## Contributing PRs are always welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md)