-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove default keymaps and make cmd additions optional #36
base: main
Are you sure you want to change the base?
Remove default keymaps and make cmd additions optional #36
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple questions before we can merge, but thanks for the thoughtful PR!
|
||
if get_dbt_version() ~= nil and get_dbt_version() >= 1.5 then | ||
log.debug "dbt version >= 1.5, using --log-level=INFO" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will break for dbt <1.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i thought all conditions of the statement would need to be true for it to be included?
if include_log_level and get_dbt_version() ~= nil and get_dbt_version() >= 1.5 then
if dbt_version < 1.5, wouldn't this not pass and log level not be applied even if include_log_level=true
?
return _find_project_dir() | ||
end | ||
end | ||
local name = vim.fn.system [[grep -E 'name: \S+' ]] + dbt_project_dir() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow, found an old bug thats been here for a while
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for your contribution!
while configuring this plugin, i noticed a few issues that didnt play nice with my config:
keys
or have a config option to accept the default keymaps, but given that the readme suggests adding them tokeys
and then also force sets them in the plugin, i opted to just remove the forced keymapsI added a configurable post cmd args that help me to be able to add flags to my dbt execution given the precommands are captured by the wrapper
i attempted to generalize the
_get_package_name
function (although i didnt see anywhere where it is used) as it seemed very specific to the creators environment, but i can remove this if it causes any issues, just seemed like something that wouldnt really work for anyone else so tried to make it more globally useful