-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Add a new completion API for experimental plugins feature. #5000
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.
clang-tidy made some suggestions
@@ -297,6 +302,39 @@ const std::map<QString, std::unique_ptr<Plugin>> &PluginController::plugins() | |||
{ | |||
return this->plugins_; | |||
} | |||
std::pair<bool, QStringList> PluginController::updateCustomCompletions( |
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.
warning: method 'updateCustomCompletions' can be made static [readability-convert-member-functions-to-static]
src/controllers/plugins/PluginController.hpp:54:
- std::pair<bool, QStringList> updateCustomCompletions(
+ static std::pair<bool, QStringList> updateCustomCompletions(
- also can't copy it now
Its goal is to check if functions which are meant to be balanced actually are.
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.
clang-tidy made some suggestions
@@ -186,6 +291,54 @@ | |||
return out; | |||
} | |||
|
|||
// Represents a Lua function on the stack | |||
template <typename ReturnType, typename... Args> | |||
class CallbackFunction |
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.
warning: class 'CallbackFunction' defines a non-default destructor, a copy assignment operator and a move assignment operator but does not define a copy constructor or a move constructor [cppcoreguidelines-special-member-functions]
class CallbackFunction
^
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.
Some nitpicks, would like to see an example plugin written in lua that utilizes the API
hell didn't, my tooling didn't either
…re/lua-completion-api-v2
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.
clang-tidy made some suggestions
@@ -306,6 +313,46 @@ const std::map<QString, std::unique_ptr<Plugin>> &PluginController::plugins() | |||
{ | |||
return this->plugins_; | |||
} | |||
std::pair<bool, QStringList> PluginController::updateCustomCompletions( |
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.
warning: method 'updateCustomCompletions' can be made static [readability-convert-member-functions-to-static]
src/controllers/plugins/PluginController.hpp:55:
- std::pair<bool, QStringList> updateCustomCompletions(
+ static std::pair<bool, QStringList> updateCustomCompletions(
The current completion example doesn't work as expected i think - is this an issue in the test plugin or in the c++ code? e.g. when I type |
Description
I remade it for the new completion system. Currently it only allows tab completion.
Example plugin using this api: https://github.com/Mm2PL/supibot-completion-plugin
I have updated https://github.com/Mm2PL/chatterino-test-plugin/ to also include a completion example
I might refactor out Unrelated: Add error tracking on load to be a separate PR.
Happy 5k