Skip to content

Commit bf31920

Browse files
authored
Merge pull request #24 from erichlf/down-help
Add help for DevcontainerDown and config for logging
2 parents 63f46b8 + 981b2a9 commit bf31920

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,18 @@ make assumptions about how you work.
144144
dotfiles_repository = "https://github.com/erichlf/dotfiles.git",
145145
dotfiles_branch = "devcontainer-cli", -- branch to clone from dotfiles_repository`
146146
dotfiles_targetPath = "~/dotfiles", -- location to install dotfiles
147-
dotfiles_intallCommand = "install.sh", -- script to run after dotfiles are cloned
147+
-- script to run after dotfiles are cloned
148+
dotfiles_intallCommand = "install.sh",
148149
shell = "bash", -- shell to use when executing commands
149150
-- The particular binary to use for connecting to in the devcontainer
150151
-- Most likely this should remain nvim
151152
nvim_binary = "nvim",
153+
-- Set the logging level for console (notifications) and file logging.
154+
-- The available levels are trace, debug, info, warn, error, or fatal.
155+
-- Set the log level for file logging
156+
log_level = "debug",
157+
-- Set the log level for console logging
158+
console_level = "info",
152159
}
153160
require('devcontainer-cli').setup(opts)
154161
end,

doc/devcontainer-cli.nvim.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ Development is in progress, but the plugin can already be used.
1111
To find out more:
1212
https://github.com/erichlf/devcontainer-cli.nvim
1313

14-
:h DevcontainerUp
15-
1614
DevcontainerUp *DevcontainerUp*
1715
Spawns a devcontainer, installing dotfiles in the docker container.
1816

@@ -28,4 +26,7 @@ DevcontainerConnect *DevcontainerConnect*
2826
Closes the nvim sessions (all sessions fromt the terminal) and opens a new
2927
terminal which is connected in the docker container, ready to execute the
3028
nvim inside the docker container and start developing your application.
29+
30+
DevcontainerDown *DevcontainerDown*
31+
Stops and removes the devcontainer associated with the current project.
3132
================================================================================

lua/devcontainer-cli/config.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ local default_config = {
4949
nvim_binary = "nvim",
5050
-- The shell to use for executing command. Available sh, bash, zsh or any
5151
-- other that uses '-c' to signify a command is to follow
52-
shell = 'bash',
52+
shell = "bash",
53+
-- Set the log level for file logging
54+
log_level = "info",
55+
-- Set the log level for console logging
56+
console_level = "info",
5357
}
5458

5559
local options

lua/devcontainer-cli/log.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
-- This library is free software; you can redistribute it and/or modify it
77
-- under the terms of the MIT license. See LICENSE for details.
88

9+
global_config = require("devcontainer-cli.config")
10+
911
-- User configuration section
1012
local default_config = {
1113
-- Name of the plugin. Prepended to log messages
@@ -21,9 +23,9 @@ local default_config = {
2123
use_file = true,
2224

2325
-- Any messages above this level will be logged to log file.
24-
log_level = "debug",
26+
log_level = global_config.log_level,
2527
-- Any messages above this level will be logged to console.
26-
console_level = "info",
28+
console_level = global_config.console_level,
2729

2830
-- Level configuration
2931
modes = {

0 commit comments

Comments
 (0)