Update generated neovim config
This commit is contained in:
@ -0,0 +1,580 @@
|
||||
==============================================================================
|
||||
Table of Contents *haskell-tools.contents*
|
||||
|
||||
Introduction ··························································· |intro|
|
||||
The haskell-tools module ······································· |haskell-tools|
|
||||
plugin configuration ···································· |haskell-tools.config|
|
||||
haskell-language-server LSP client tools ··················· |haskell-tools.lsp|
|
||||
haskell-tools nvim-dap setup ······························· |haskell-tools.dap|
|
||||
haskell-tools Hoogle search ····························· |haskell-tools.hoogle|
|
||||
haskell-tools GHCi REPL module ···························· |haskell-tools.repl|
|
||||
haskell-tools Project module ··························· |haskell-tools.project|
|
||||
haskell-tools fast-tags module ···························· |haskell-tools.tags|
|
||||
haskell-tools Logging ······································ |haskell-tools.log|
|
||||
|
||||
==============================================================================
|
||||
Introduction *intro*
|
||||
|
||||
This plugin automatically configures the `haskell-language-server` builtin LSP client
|
||||
and integrates with other haskell tools.
|
||||
|
||||
WARNING:
|
||||
Do not call the `lspconfig.hls` setup or set up the lsp manually,
|
||||
as doing so may cause conflicts.
|
||||
|
||||
NOTE: This plugin is a filetype plugin.
|
||||
There is no need to call a `setup` function.
|
||||
|
||||
==============================================================================
|
||||
The haskell-tools module *haskell-tools*
|
||||
|
||||
Entry-point into this plugin's public API.
|
||||
|
||||
HaskellTools *HaskellTools*
|
||||
|
||||
|
||||
==============================================================================
|
||||
plugin configuration *haskell-tools.config*
|
||||
|
||||
To configure haskell-tools.nvim, set the variable `vim.g.haskell_tools`,
|
||||
which is a `haskell-tools.Opts` table, in your neovim configuration.
|
||||
|
||||
Example:
|
||||
>
|
||||
---@type haskell-tools.Opts
|
||||
vim.g.haskell_tools = {
|
||||
---@type haskell-tools.tools.Opts
|
||||
tools = {
|
||||
-- ...
|
||||
},
|
||||
---@type haskell-tools.lsp.ClientOpts
|
||||
hls = {
|
||||
on_attach = function(client, bufnr)
|
||||
-- Set keybindings, etc. here.
|
||||
end,
|
||||
-- ...
|
||||
},
|
||||
---@type haskell-tools.dap.Opts
|
||||
dap = {
|
||||
-- ...
|
||||
},
|
||||
}
|
||||
<
|
||||
|
||||
Note: `vim.g.haskell_tools` can also be a function that returns a 'haskell-tools.Opts' table.
|
||||
|
||||
|
||||
haskell-tools.Opts *haskell-tools.Opts*
|
||||
|
||||
Fields: ~
|
||||
{tools?} (haskell-tools.tools.Opts)
|
||||
haskell-tools module options.
|
||||
{hls?} (haskell-tools.lsp.ClientOpts)
|
||||
haskell-language-server client options.
|
||||
{dap?} (haskell-tools.dap.Opts)
|
||||
debug adapter config for nvim-dap.
|
||||
|
||||
|
||||
haskell-tools.tools.Opts *haskell-tools.tools.Opts*
|
||||
|
||||
Fields: ~
|
||||
{codeLens?} (haskell-tools.codeLens.Opts)
|
||||
LSP codeLens options.
|
||||
{hoogle?} (haskell-tools.hoogle.Opts)
|
||||
Hoogle type signature search options.
|
||||
{hover?} (haskell-tools.hover.Opts)
|
||||
LSP hover options.
|
||||
{definition?} (haskell-tools.definition.Opts) LSP go-to-definition options.
|
||||
{repl?} (haskell-tools.repl.Opts)
|
||||
GHCi repl options.
|
||||
{tags?} (haskell-tools.fast-tags.Opts)
|
||||
fast-tags module options.
|
||||
{log?} (haskell-tools.log.Opts)
|
||||
haskell-tools logger options.
|
||||
|
||||
|
||||
haskell-tools.codeLens.Opts *haskell-tools.codeLens.Opts*
|
||||
|
||||
Fields: ~
|
||||
{autoRefresh?} (fun():boolean|boolean)
|
||||
(default: `true`) Whether to auto-refresh code-lenses.
|
||||
|
||||
|
||||
haskell-tools.hoogle.Opts *haskell-tools.hoogle.Opts*
|
||||
|
||||
Fields: ~
|
||||
{mode?} (haskell-tools.hoogle.Mode)
|
||||
Use a telescope with a local hoogle installation or a web backend,
|
||||
or use the browser for hoogle signature search?
|
||||
|
||||
|
||||
haskell-tools.hoogle.Mode *haskell-tools.hoogle.Mode*
|
||||
|
||||
Type: ~
|
||||
"auto"|"telescope-local"|"telescope-web"|"browser"
|
||||
|
||||
|
||||
haskell-tools.hover.Opts *haskell-tools.hover.Opts*
|
||||
|
||||
Fields: ~
|
||||
{enable?} (fun():boolean|boolean)
|
||||
(default: `true`) Whether to enable haskell-tools hover.
|
||||
{border?} (string[][])
|
||||
The hover window's border. Set to `nil` to disable.
|
||||
{stylize_markdown?} (boolean)
|
||||
(default: `false`) The builtin LSP client's default behaviour is to stylize markdown.
|
||||
Setting this option to false sets the file type to markdown
|
||||
and enables treesitter syntax highligting for Haskell snippets if nvim-treesitter is installed.
|
||||
{auto_focus?} (boolean)
|
||||
(default: `false`) Whether to automatically switch to the hover window.
|
||||
|
||||
|
||||
haskell-tools.definition.Opts *haskell-tools.definition.Opts*
|
||||
|
||||
Fields: ~
|
||||
{hoogle_signature_fallback?} (fun():boolean|boolean)
|
||||
(default: `false`) Configure |vim.lsp.definition| to fall back to hoogle search
|
||||
(does not affect |vim.lsp.tagfunc|).
|
||||
|
||||
|
||||
haskell-tools.repl.Opts *haskell-tools.repl.Opts*
|
||||
|
||||
Fields: ~
|
||||
{handler?} (fun():haskell-tools.repl.Handler|haskell-tools.repl.Handler)
|
||||
`'builtin'`: Use the simple builtin repl.
|
||||
`'toggleterm'`: Use akinsho/toggleterm.nvim.
|
||||
{prefer?} (fun():haskell-tools.repl.Backend|haskell-tools.repl.Backend)
|
||||
Prefer cabal or stack when both stack and cabal project files are present?
|
||||
{builtin?} (haskell-tools.repl.builtin.Opts)
|
||||
Configuration for the builtin repl.
|
||||
{auto_focus?} (boolean)
|
||||
Whether to auto-focus the repl on toggle or send. If unset, the handler decides.
|
||||
|
||||
|
||||
haskell-tools.repl.Handler *haskell-tools.repl.Handler*
|
||||
|
||||
Type: ~
|
||||
"builtin"|"toggleterm"
|
||||
|
||||
|
||||
haskell-tools.repl.Backend *haskell-tools.repl.Backend*
|
||||
|
||||
Type: ~
|
||||
"cabal"|"stack"
|
||||
|
||||
|
||||
haskell-tools.repl.builtin.Opts *haskell-tools.repl.builtin.Opts*
|
||||
|
||||
Fields: ~
|
||||
{create_repl_window?} (fun(view:haskell-tools.repl.View):fun(mk_repl_cmd:mk_ht_repl_cmd_fun))
|
||||
How to create the repl window.
|
||||
Should return a function that calls one of the |haskell-tools.repl.View|'s functions.
|
||||
|
||||
|
||||
haskell-tools.repl.View *haskell-tools.repl.View*
|
||||
|
||||
Fields: ~
|
||||
{create_repl_split?} (fun(opts:haskell-tools.repl.view.Opts):mk_ht_repl_cmd_fun)
|
||||
Create the REPL in a horizontally split window.
|
||||
{create_repl_vsplit?} (fun(opts:haskell-tools.repl.view.Opts):mk_ht_repl_cmd_fun)
|
||||
Create the REPL in a vertically split window.
|
||||
{create_repl_tabnew?} (fun(opts:haskell-tools.repl.view.Opts):mk_ht_repl_cmd_fun)
|
||||
Create the REPL in a new tab.
|
||||
{create_repl_cur_win?} (fun(opts:haskell-tools.repl.view.Opts):mk_ht_repl_cmd_fun)
|
||||
Create the REPL in the current window.
|
||||
|
||||
|
||||
haskell-tools.repl.view.Opts *haskell-tools.repl.view.Opts*
|
||||
|
||||
Fields: ~
|
||||
{delete_buffer_on_exit?} (boolean)
|
||||
Whether to delete the buffer when the Repl quits.
|
||||
{size?} (fun():number|number)
|
||||
The size of the window or a function that determines it.
|
||||
|
||||
|
||||
mk_ht_repl_cmd_fun *mk_ht_repl_cmd_fun*
|
||||
|
||||
Type: ~
|
||||
fun():string[]|nil
|
||||
|
||||
|
||||
haskell-tools.fast-tags.Opts *haskell-tools.fast-tags.Opts*
|
||||
|
||||
Fields: ~
|
||||
{enable?} (boolean|fun():boolean)
|
||||
Enabled by default if the `fast-tags` executable is found.
|
||||
{package_events?} (string[])
|
||||
The |autocmd| events to trigger package tag generation.
|
||||
|
||||
|
||||
haskell-tools.log.Opts *haskell-tools.log.Opts*
|
||||
|
||||
Fields: ~
|
||||
{level?} (number|string)
|
||||
The log level.
|
||||
|
||||
See: ~
|
||||
|vim.log.levels|
|
||||
|
||||
|
||||
haskell-tools.lsp.ClientOpts *haskell-tools.lsp.ClientOpts*
|
||||
|
||||
Fields: ~
|
||||
{auto_attach?} (fun():boolean|boolean)
|
||||
Whether to automatically attach the LSP client.
|
||||
Defaults to `true` if the haskell-language-server executable is found.
|
||||
{debug?} (boolean)
|
||||
Whether to enable haskell-language-server debug logging.
|
||||
{on_attach?} (fun(client:number,bufnr:number,ht:HaskellTools))
|
||||
Callback that is invoked when the client attaches to a buffer.
|
||||
{cmd?} (fun():string[]|string[])
|
||||
The command to start haskell-language-server with.
|
||||
{capabilities?} (lsp.ClientCapabilities)
|
||||
LSP client capabilities.
|
||||
{settings?} (fun(project_root:string|nil):table|table)
|
||||
The haskell-language-server settings or a function that creates them.
|
||||
To view the default settings, run `haskell-language-server generate-default-config`.
|
||||
{default_settings?} (table)
|
||||
The default haskell-language-server settings that will be used if no settings are specified or detected.
|
||||
{logfile?} (string)
|
||||
The path to the haskell-language-server log file.
|
||||
|
||||
|
||||
To print all options that are available for your haskell-language-server version, run `haskell-language-server-wrapper generate-default-config`
|
||||
See: https://haskell-language-server.readthedocs.io/en/latest/configuration.html.
|
||||
|
||||
haskell-tools.dap.Opts *haskell-tools.dap.Opts*
|
||||
|
||||
Fields: ~
|
||||
{cmd?} (string[])
|
||||
The command to start the debug adapter server with.
|
||||
{logFile?} (string)
|
||||
Log file path for detected configurations.
|
||||
{logLevel?} (haskell-tools.debugAdapter.LogLevel)
|
||||
The log level for detected configurations.
|
||||
{auto_discover?} (boolean|haskell-tools.dap.AddConfigOpts) Set to `false` to disable auto-discovery of launch configurations. `true` uses the default configurations options`.
|
||||
|
||||
|
||||
haskell-tools.debugAdapter.LogLevel *haskell-tools.debugAdapter.LogLevel*
|
||||
|
||||
Type: ~
|
||||
"Debug"|"Info"|"Warning"|"Error"
|
||||
|
||||
|
||||
haskell-tools.dap.AddConfigOpts *haskell-tools.dap.AddConfigOpts*
|
||||
|
||||
Fields: ~
|
||||
{autodetect} (boolean)
|
||||
Whether to automatically detect launch configurations for the project.
|
||||
{settings_file_pattern} (string)
|
||||
File name or pattern to search for.
|
||||
Defaults to 'launch.json'.
|
||||
|
||||
|
||||
==============================================================================
|
||||
haskell-language-server LSP client tools *haskell-tools.lsp*
|
||||
|
||||
The following commands are available:
|
||||
|
||||
* `:Hls start` - Start the LSP client.
|
||||
* `:Hls stop` - Stop the LSP client.
|
||||
* `:Hls restart` - Restart the LSP client.
|
||||
* `:Hls evalAll` - Evaluate all code snippets in comments.
|
||||
|
||||
haskell-tools.load_hls_settings.Opts *haskell-tools.load_hls_settings.Opts*
|
||||
|
||||
Fields: ~
|
||||
{settings_file_pattern} (string|nil) File name or pattern to search for. Defaults to 'hls.json'
|
||||
|
||||
|
||||
haskell-tools.Hls *haskell-tools.Hls*
|
||||
|
||||
|
||||
*Hls.load_hls_settings*
|
||||
Hls.load_hls_settings({project_root}, {opts})
|
||||
Search the project root for a haskell-language-server settings JSON file and load it to a Lua table.
|
||||
Falls back to the `hls.default_settings` if no file is found or file cannot be read or decoded.
|
||||
|
||||
Parameters: ~
|
||||
{project_root} (string|nil) The project root
|
||||
{opts} (haskell-tools.load_hls_settings.Opts|nil)
|
||||
|
||||
Returns: ~
|
||||
(table) hls_settings
|
||||
|
||||
See: ~
|
||||
|https://haskell-language-server.readthedocs.io/en/latest/configuration.html|
|
||||
|
||||
|
||||
Hls.start({bufnr}) *Hls.start*
|
||||
Start or attach the LSP client.
|
||||
Fails silently if the buffer's filetype is not one of the filetypes specified in the config.
|
||||
|
||||
Parameters: ~
|
||||
{bufnr} (number|nil) The buffer number (optional), defaults to the current buffer
|
||||
|
||||
Returns: ~
|
||||
(number|nil) The LSP client ID
|
||||
|
||||
|
||||
Hls.stop({bufnr}) *Hls.stop*
|
||||
Stop the LSP client.
|
||||
|
||||
Parameters: ~
|
||||
{bufnr} (number|nil) The buffer number (optional), defaults to the current buffer
|
||||
|
||||
Returns: ~
|
||||
(table[]) A list of clients that will be stopped
|
||||
|
||||
|
||||
Hls.restart({bufnr}) *Hls.restart*
|
||||
Restart the LSP client.
|
||||
Fails silently if the buffer's filetype is not one of the filetypes specified in the config.
|
||||
|
||||
Parameters: ~
|
||||
{bufnr} (number|nil) The buffer number (optional), defaults to the current buffer
|
||||
|
||||
Returns: ~
|
||||
(number|nil) The LSP client ID after restart
|
||||
|
||||
|
||||
Hls.buf_eval_all({bufnr}) *Hls.buf_eval_all*
|
||||
Evaluate all code snippets in comments.
|
||||
|
||||
Parameters: ~
|
||||
{bufnr} (number|nil) Defaults to the current buffer.
|
||||
|
||||
Returns: ~
|
||||
(nil)
|
||||
|
||||
|
||||
==============================================================================
|
||||
haskell-tools nvim-dap setup *haskell-tools.dap*
|
||||
|
||||
haskell-tools.dap.LaunchConfiguration *haskell-tools.dap.LaunchConfiguration*
|
||||
|
||||
|
||||
haskell-tools.Dap *haskell-tools.Dap*
|
||||
|
||||
|
||||
*Dap.discover_configurations*
|
||||
Dap.discover_configurations({bufnr}, {opts})
|
||||
Discover nvim-dap launch configurations for haskell-debug-adapter.
|
||||
|
||||
Parameters: ~
|
||||
{bufnr} (number|nil) The buffer number
|
||||
{opts} (haskell-tools.dap.AddConfigOpts|nil)
|
||||
|
||||
Returns: ~
|
||||
(nil)
|
||||
|
||||
|
||||
==============================================================================
|
||||
haskell-tools Hoogle search *haskell-tools.hoogle*
|
||||
|
||||
haskell-tools.Hoogle *haskell-tools.Hoogle*
|
||||
|
||||
|
||||
Hoogle.hoogle_signature({options}) *Hoogle.hoogle_signature*
|
||||
|
||||
Parameters: ~
|
||||
{options} (table<string,any>|nil) Includes the `search_term` and options to pass to the telescope picker (if available)
|
||||
|
||||
Returns: ~
|
||||
(nil)
|
||||
|
||||
|
||||
==============================================================================
|
||||
haskell-tools GHCi REPL module *haskell-tools.repl*
|
||||
|
||||
The following commands are available:
|
||||
|
||||
* `:Haskell repl toggle {file?}` - Toggle a GHCi repl.
|
||||
* `:Haskell repl quit` - Quit the current repl.
|
||||
* `:Haskell repl load {file?}` - Load a Haskell file into the repl.
|
||||
* `:Haskell repl reload` - Reload the current repl.
|
||||
* `:Haskell repl paste_type {register?}` - Query the repl for the type of |registers| {register}
|
||||
* `:Haskell repl cword_type` - Query the repl for the type of |cword|
|
||||
* `:Haskell repl paste_info {register?}` - Query the repl for the info on |registers| {register}
|
||||
* `:Haskell repl cword_info` - Query the repl for info on |cword|
|
||||
|
||||
haskell-tools.Repl *haskell-tools.Repl*
|
||||
|
||||
|
||||
Repl.buf_mk_repl_cmd() *Repl.buf_mk_repl_cmd*
|
||||
Create the command to create a repl for the current buffer.
|
||||
|
||||
Returns: ~
|
||||
(table|nil) command
|
||||
|
||||
|
||||
Repl.operator() *Repl.operator*
|
||||
|
||||
See: ~
|
||||
|operatorfunc|
|
||||
|
||||
|
||||
Repl.paste({reg}) *Repl.paste*
|
||||
Paste from register `reg` to the REPL
|
||||
|
||||
Parameters: ~
|
||||
{reg} (string|nil) register (defaults to '"')
|
||||
|
||||
|
||||
Repl.paste_type({reg}) *Repl.paste_type*
|
||||
Query the REPL for the type of register `reg`
|
||||
|
||||
Parameters: ~
|
||||
{reg} (string|nil) register (defaults to '"')
|
||||
|
||||
|
||||
Repl.cword_type() *Repl.cword_type*
|
||||
Query the REPL for the type of word under the cursor
|
||||
|
||||
|
||||
Repl.paste_info({reg}) *Repl.paste_info*
|
||||
Query the REPL for info on register `reg`
|
||||
|
||||
Parameters: ~
|
||||
{reg} (string|nil) register (defaults to '"')
|
||||
|
||||
|
||||
Repl.cword_info() *Repl.cword_info*
|
||||
Query the REPL for the type of word under the cursor
|
||||
|
||||
|
||||
Repl.load_file({filepath}) *Repl.load_file*
|
||||
Load a file into the REPL
|
||||
|
||||
Parameters: ~
|
||||
{filepath} (string) The absolute file path
|
||||
|
||||
|
||||
Repl.reload() *Repl.reload*
|
||||
Reload the repl
|
||||
|
||||
|
||||
==============================================================================
|
||||
haskell-tools Project module *haskell-tools.project*
|
||||
|
||||
The following commands are available:
|
||||
|
||||
* `:Haskell projectFile` - Open the project file for the current buffer (cabal.project or stack.yaml).
|
||||
* `:Haskell packageYaml` - Open the package.yaml file for the current buffer.
|
||||
* `:Haskell packageCabal` - Open the *.cabal file for the current buffer.
|
||||
|
||||
haskell-tools.Project *haskell-tools.Project*
|
||||
|
||||
|
||||
Project.root_dir({project_file}) *Project.root_dir*
|
||||
Get the project's root directory
|
||||
|
||||
Parameters: ~
|
||||
{project_file} (string) The path to a project file
|
||||
|
||||
Returns: ~
|
||||
(string|nil)
|
||||
|
||||
|
||||
Project.open_package_yaml() *Project.open_package_yaml*
|
||||
Open the package.yaml of the package containing the current buffer.
|
||||
|
||||
Returns: ~
|
||||
(nil)
|
||||
|
||||
|
||||
Project.open_package_cabal() *Project.open_package_cabal*
|
||||
Open the *.cabal file of the package containing the current buffer.
|
||||
|
||||
Returns: ~
|
||||
(nil)
|
||||
|
||||
|
||||
Project.open_project_file() *Project.open_project_file*
|
||||
Open the current buffer's project file (cabal.project or stack.yaml).
|
||||
|
||||
Returns: ~
|
||||
(nil)
|
||||
|
||||
|
||||
==============================================================================
|
||||
haskell-tools fast-tags module *haskell-tools.tags*
|
||||
|
||||
*haskell-tools.tags.generate_project_tags.Opts*
|
||||
haskell-tools.tags.generate_project_tags.Opts
|
||||
|
||||
Fields: ~
|
||||
{refresh} (boolean) Whether to refresh the tags if they have already been generated
|
||||
|
||||
|
||||
haskell-tools.FastTags *haskell-tools.FastTags*
|
||||
for the project (default: true)
|
||||
|
||||
|
||||
*FastTags.generate_project_tags*
|
||||
FastTags.generate_project_tags({path}, {opts})
|
||||
Generates tags for the current project
|
||||
|
||||
Parameters: ~
|
||||
{path} (string|nil) File path
|
||||
{opts} (haskell-tools.tags.generate_project_tags.Opts|nil) Options
|
||||
|
||||
|
||||
FastTags.generate_package_tags({path}) *FastTags.generate_package_tags*
|
||||
Generate tags for the package containing `path`
|
||||
|
||||
Parameters: ~
|
||||
{path} (string|nil) File path
|
||||
|
||||
|
||||
==============================================================================
|
||||
haskell-tools Logging *haskell-tools.log*
|
||||
|
||||
The following commands are available:
|
||||
|
||||
* `:Haskell log setLevel` - Set the haskell-tools.nvim and LSP client log level.
|
||||
* `:Haskell log openLog` - Open the haskell-tools.nvim log file.
|
||||
* `:Haskell log openHlsLog` - Open the haskell-language-server log file.
|
||||
|
||||
haskell-tools.Log *haskell-tools.Log*
|
||||
|
||||
|
||||
Log.get_hls_logfile() *Log.get_hls_logfile*
|
||||
Get the haskell-language-server log file
|
||||
|
||||
Returns: ~
|
||||
(string) filepath
|
||||
|
||||
|
||||
Log.get_logfile() *Log.get_logfile*
|
||||
Get the haskell-tools.nvim log file path.
|
||||
|
||||
Returns: ~
|
||||
(string) filepath
|
||||
|
||||
|
||||
Log.nvim_open_hls_logfile() *Log.nvim_open_hls_logfile*
|
||||
Open the haskell-language-server log file
|
||||
|
||||
Returns: ~
|
||||
(nil)
|
||||
|
||||
|
||||
Log.nvim_open_logfile() *Log.nvim_open_logfile*
|
||||
Open the haskell-tools.nvim log file.
|
||||
|
||||
Returns: ~
|
||||
(nil)
|
||||
|
||||
|
||||
Log.set_level() *Log.set_level*
|
||||
|
||||
Returns: ~
|
||||
(nil)
|
||||
|
||||
See: ~
|
||||
|vim.log.levels|
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
@ -0,0 +1 @@
|
||||
require('haskell-tools.internal').ftplugin()
|
||||
@ -0,0 +1 @@
|
||||
require('haskell-tools.internal').ftplugin()
|
||||
@ -0,0 +1 @@
|
||||
require('haskell-tools.internal').ftplugin()
|
||||
@ -0,0 +1 @@
|
||||
require('haskell-tools.internal').ftplugin()
|
||||
@ -0,0 +1,40 @@
|
||||
local git_ref = '4.0.0'
|
||||
local modrev = '4.0.0'
|
||||
local specrev = '1'
|
||||
|
||||
local repo_url = 'https://github.com/mrcjkb/haskell-tools.nvim'
|
||||
|
||||
rockspec_format = '3.0'
|
||||
package = 'haskell-tools.nvim'
|
||||
version = modrev ..'-'.. specrev
|
||||
|
||||
description = {
|
||||
summary = ' 🦥 Supercharge your Haskell experience in neovim!',
|
||||
detailed = [[
|
||||
This plugin automatically configures the haskell-language-server builtin LSP client
|
||||
and integrates with other Haskell tools. See the README's #features section
|
||||
for more info.]],
|
||||
labels = { 'dap', 'debug-adapter-protocol', 'fast-tags', 'haskell', 'hoogle', 'language-server', 'language-server-protocol', 'lsp', 'lsp-client', 'lua', 'neovim', 'neovim-plugin', 'nvim', 'plugin', 'repl', 'tagfunc', 'telescope', 'vim' } ,
|
||||
homepage = 'https://github.com/mrcjkb/haskell-tools.nvim',
|
||||
license = 'GPL-2.0'
|
||||
}
|
||||
|
||||
dependencies = { 'lua >= 5.1' }
|
||||
|
||||
test_dependencies = { }
|
||||
|
||||
source = {
|
||||
url = repo_url .. '/archive/' .. git_ref .. '.zip',
|
||||
dir = 'haskell-tools.nvim-' .. '4.0.0',
|
||||
}
|
||||
|
||||
if modrev == 'scm' or modrev == 'dev' then
|
||||
source = {
|
||||
url = repo_url:gsub('https', 'git')
|
||||
}
|
||||
end
|
||||
|
||||
build = {
|
||||
type = 'builtin',
|
||||
copy_directories = { 'doc', 'ftplugin' } ,
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
rock_manifest = {
|
||||
doc = {
|
||||
["haskell-tools.txt"] = "727cc3d507969c15da72d8fc078b8f5c"
|
||||
},
|
||||
ftplugin = {
|
||||
["cabal.lua"] = "4f72e96d3601fed58fd4a24e9633172d",
|
||||
["cabalproject.lua"] = "4f72e96d3601fed58fd4a24e9633172d",
|
||||
["haskell.lua"] = "4f72e96d3601fed58fd4a24e9633172d",
|
||||
["lhaskell.lua"] = "4f72e96d3601fed58fd4a24e9633172d"
|
||||
},
|
||||
["haskell-tools.nvim-4.0.0-1.rockspec"] = "d9f68f3f100a893c53e199412b290aca",
|
||||
lua = {
|
||||
["haskell-tools"] = {
|
||||
["commands.lua"] = "196ecaed184ea3aac299908789ec907c",
|
||||
config = {
|
||||
["check.lua"] = "25ad72d0043d59c98fea0d7262bc3af6",
|
||||
["init.lua"] = "c5de71c6a83b03f9b3281eb153bb0a4e",
|
||||
["internal.lua"] = "ad38f5368950178cce22d6328f87104e"
|
||||
},
|
||||
dap = {
|
||||
["init.lua"] = "c6c938e8b498b5204d94e698c463a453",
|
||||
["internal.lua"] = "d31fbe6dc31b3cc94916fa5d7a042902"
|
||||
},
|
||||
["deps.lua"] = "bc917d0fb10a9c6b9f57838ad6c15770",
|
||||
["health.lua"] = "2973c5710025bea8a5eb7fadaf291050",
|
||||
hoogle = {
|
||||
["helpers.lua"] = "cbbd886b653824acfad1f6ee9f3e24a5",
|
||||
["init.lua"] = "ab7621676750cb3bfa7c0a4598ac8bfc",
|
||||
["local.lua"] = "b2a230bfe523fbf20a1e25b35b99b77b",
|
||||
["web.lua"] = "acf3c84bf67b25fa37de256e83f3fabc"
|
||||
},
|
||||
["init.lua"] = "a47dd52851320ba781a3d37301cc0068",
|
||||
["internal.lua"] = "9b5503d7a3f874c2e1227b2613449661",
|
||||
log = {
|
||||
["init.lua"] = "34e3645981b674afbfedb4bb38c1c720",
|
||||
["internal.lua"] = "abf7c2d2f5397138bfe53bfea4f8f22f"
|
||||
},
|
||||
lsp = {
|
||||
["definition.lua"] = "04348f8215b227a5da688b92e1cfe23b",
|
||||
["eval.lua"] = "69614508eab450ad811c9cbdd46130a9",
|
||||
["helpers.lua"] = "db4e09ce2ad6c821a562a672c34fc353",
|
||||
["hover.lua"] = "2aa35d13516fa0aadb38c128c0e2f636",
|
||||
["init.lua"] = "fa1e72e1227141163ece82c07371ddd3"
|
||||
},
|
||||
["os.lua"] = "9ac35aebb3f78518df747a54d376b301",
|
||||
["parser.lua"] = "e68b0de6ec66c30918ec6a1008ed4884",
|
||||
project = {
|
||||
["cabal.lua"] = "278495ec4fae050d00d8c777b21d7225",
|
||||
["helpers.lua"] = "02d5e2b6261082776a01edcdd91acb09",
|
||||
["init.lua"] = "4a382b5d3ae48ed5d58089fe641bcd6d",
|
||||
["stack.lua"] = "9c013778ee77288578963b22b25b77e1"
|
||||
},
|
||||
repl = {
|
||||
["builtin.lua"] = "bb346659484daab7f479f35d4c12b688",
|
||||
["init.lua"] = "e262c0947f43a68b2fe3ff64e5e555d4",
|
||||
["toggleterm.lua"] = "61c197873d8e659bfcc8a903d1c73261"
|
||||
},
|
||||
["strings.lua"] = "61ee9372c3074bf51f2619b9e135910d",
|
||||
["tags.lua"] = "65d95ec2dc2c55e28aab5f8a1e71eb56",
|
||||
types = {
|
||||
["internal.lua"] = "0360b137c2d65a32ea862f498154af7b"
|
||||
}
|
||||
},
|
||||
telescope = {
|
||||
_extensions = {
|
||||
ht = {
|
||||
["extension.lua"] = "040c10b48645d3230bba5952281ea858"
|
||||
},
|
||||
["ht.lua"] = "ebd1a0ec34353b6b42b5e6012ff69dd9"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,173 @@
|
||||
commands = {}
|
||||
dependencies = {
|
||||
["haskell-tools.nvim"] = {
|
||||
["4.0.0-1"] = {
|
||||
{
|
||||
constraints = {
|
||||
{
|
||||
op = ">=",
|
||||
version = {
|
||||
5, 1, string = "5.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
name = "lua"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
modules = {
|
||||
["haskell-tools.commands"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.config.check"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.config.init"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.config.internal"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.dap.init"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.dap.internal"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.deps"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.health"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.hoogle.helpers"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.hoogle.init"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.hoogle.local"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.hoogle.web"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.init"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.internal"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.log.init"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.log.internal"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.lsp.definition"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.lsp.eval"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.lsp.helpers"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.lsp.hover"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.lsp.init"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.os"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.parser"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.project.cabal"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.project.helpers"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.project.init"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.project.stack"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.repl.builtin"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.repl.init"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.repl.toggleterm"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.strings"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.tags"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["haskell-tools.types.internal"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["telescope._extensions.ht"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
},
|
||||
["telescope._extensions.ht.extension"] = {
|
||||
"haskell-tools.nvim/4.0.0-1"
|
||||
}
|
||||
}
|
||||
repository = {
|
||||
["haskell-tools.nvim"] = {
|
||||
["4.0.0-1"] = {
|
||||
{
|
||||
arch = "installed",
|
||||
commands = {},
|
||||
dependencies = {},
|
||||
modules = {
|
||||
["haskell-tools.commands"] = "haskell-tools/commands.lua",
|
||||
["haskell-tools.config.check"] = "haskell-tools/config/check.lua",
|
||||
["haskell-tools.config.init"] = "haskell-tools/config/init.lua",
|
||||
["haskell-tools.config.internal"] = "haskell-tools/config/internal.lua",
|
||||
["haskell-tools.dap.init"] = "haskell-tools/dap/init.lua",
|
||||
["haskell-tools.dap.internal"] = "haskell-tools/dap/internal.lua",
|
||||
["haskell-tools.deps"] = "haskell-tools/deps.lua",
|
||||
["haskell-tools.health"] = "haskell-tools/health.lua",
|
||||
["haskell-tools.hoogle.helpers"] = "haskell-tools/hoogle/helpers.lua",
|
||||
["haskell-tools.hoogle.init"] = "haskell-tools/hoogle/init.lua",
|
||||
["haskell-tools.hoogle.local"] = "haskell-tools/hoogle/local.lua",
|
||||
["haskell-tools.hoogle.web"] = "haskell-tools/hoogle/web.lua",
|
||||
["haskell-tools.init"] = "haskell-tools/init.lua",
|
||||
["haskell-tools.internal"] = "haskell-tools/internal.lua",
|
||||
["haskell-tools.log.init"] = "haskell-tools/log/init.lua",
|
||||
["haskell-tools.log.internal"] = "haskell-tools/log/internal.lua",
|
||||
["haskell-tools.lsp.definition"] = "haskell-tools/lsp/definition.lua",
|
||||
["haskell-tools.lsp.eval"] = "haskell-tools/lsp/eval.lua",
|
||||
["haskell-tools.lsp.helpers"] = "haskell-tools/lsp/helpers.lua",
|
||||
["haskell-tools.lsp.hover"] = "haskell-tools/lsp/hover.lua",
|
||||
["haskell-tools.lsp.init"] = "haskell-tools/lsp/init.lua",
|
||||
["haskell-tools.os"] = "haskell-tools/os.lua",
|
||||
["haskell-tools.parser"] = "haskell-tools/parser.lua",
|
||||
["haskell-tools.project.cabal"] = "haskell-tools/project/cabal.lua",
|
||||
["haskell-tools.project.helpers"] = "haskell-tools/project/helpers.lua",
|
||||
["haskell-tools.project.init"] = "haskell-tools/project/init.lua",
|
||||
["haskell-tools.project.stack"] = "haskell-tools/project/stack.lua",
|
||||
["haskell-tools.repl.builtin"] = "haskell-tools/repl/builtin.lua",
|
||||
["haskell-tools.repl.init"] = "haskell-tools/repl/init.lua",
|
||||
["haskell-tools.repl.toggleterm"] = "haskell-tools/repl/toggleterm.lua",
|
||||
["haskell-tools.strings"] = "haskell-tools/strings.lua",
|
||||
["haskell-tools.tags"] = "haskell-tools/tags.lua",
|
||||
["haskell-tools.types.internal"] = "haskell-tools/types/internal.lua",
|
||||
["telescope._extensions.ht"] = "telescope/_extensions/ht.lua",
|
||||
["telescope._extensions.ht.extension"] = "telescope/_extensions/ht/extension.lua"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
local git_ref = '4.0.0'
|
||||
local modrev = '4.0.0'
|
||||
local specrev = '1'
|
||||
|
||||
local repo_url = 'https://github.com/mrcjkb/haskell-tools.nvim'
|
||||
|
||||
rockspec_format = '3.0'
|
||||
package = 'haskell-tools.nvim'
|
||||
version = modrev ..'-'.. specrev
|
||||
|
||||
description = {
|
||||
summary = ' 🦥 Supercharge your Haskell experience in neovim!',
|
||||
detailed = [[
|
||||
This plugin automatically configures the haskell-language-server builtin LSP client
|
||||
and integrates with other Haskell tools. See the README's #features section
|
||||
for more info.]],
|
||||
labels = { 'dap', 'debug-adapter-protocol', 'fast-tags', 'haskell', 'hoogle', 'language-server', 'language-server-protocol', 'lsp', 'lsp-client', 'lua', 'neovim', 'neovim-plugin', 'nvim', 'plugin', 'repl', 'tagfunc', 'telescope', 'vim' } ,
|
||||
homepage = 'https://github.com/mrcjkb/haskell-tools.nvim',
|
||||
license = 'GPL-2.0'
|
||||
}
|
||||
|
||||
dependencies = { 'lua >= 5.1' }
|
||||
|
||||
test_dependencies = { }
|
||||
|
||||
source = {
|
||||
url = repo_url .. '/archive/' .. git_ref .. '.zip',
|
||||
dir = 'haskell-tools.nvim-' .. '4.0.0',
|
||||
}
|
||||
|
||||
if modrev == 'scm' or modrev == 'dev' then
|
||||
source = {
|
||||
url = repo_url:gsub('https', 'git')
|
||||
}
|
||||
end
|
||||
|
||||
build = {
|
||||
type = 'builtin',
|
||||
copy_directories = { 'doc', 'ftplugin' } ,
|
||||
}
|
||||
@ -0,0 +1,223 @@
|
||||
local HtCommands = {}
|
||||
|
||||
local ht = require('haskell-tools')
|
||||
|
||||
---@class haskell-tools.Subcommand
|
||||
---
|
||||
---The command implementation
|
||||
---@field impl fun(args: string[], opts: vim.api.keyset.user_command)
|
||||
---
|
||||
---Command completions callback, taking the lead of the subcommand's arguments
|
||||
---Or a list of subcommands
|
||||
---@field complete? string[] | fun(subcmd_arg_lead: string): string[]
|
||||
---
|
||||
---Whether this command supports a bang!
|
||||
---@field bang? boolean
|
||||
|
||||
---@param arg_lead string
|
||||
local function complete_haskell_files(arg_lead)
|
||||
vim.print(arg_lead)
|
||||
return vim
|
||||
.iter(vim.list_extend(vim.fn.getcompletion(arg_lead, 'file'), vim.fn.getcompletion(arg_lead, 'buffer')))
|
||||
:filter(function(file_path)
|
||||
local ext = vim.fn.fnamemodify(file_path, ':e')
|
||||
return ext == 'hs' or ext == ''
|
||||
end)
|
||||
:totable()
|
||||
end
|
||||
|
||||
---@param args? string[]
|
||||
---@return string?
|
||||
local function get_single_opt_arg(args)
|
||||
if type(args) ~= 'table' then
|
||||
return
|
||||
end
|
||||
if #args > 1 then
|
||||
require('haskell-tools.log.internal').warn { 'Too many arguments!', args }
|
||||
end
|
||||
return #args > 0 and args[1] or nil
|
||||
end
|
||||
|
||||
---@param args? string[]
|
||||
---@return string
|
||||
local function get_filepath_arg(args)
|
||||
if not args or #args == 0 then
|
||||
return vim.api.nvim_buf_get_name(0)
|
||||
end
|
||||
vim.validate('filepath', args[1], 'string')
|
||||
local filepath = vim.fn.expand(args[1])
|
||||
---@cast filepath string
|
||||
return filepath
|
||||
end
|
||||
|
||||
---@type table<string, haskell-tools.Subcommand>
|
||||
local command_tbl = {
|
||||
packageYaml = {
|
||||
impl = function()
|
||||
ht.project.open_package_yaml()
|
||||
end,
|
||||
},
|
||||
packageCabal = {
|
||||
impl = function()
|
||||
ht.project.open_package_cabal()
|
||||
end,
|
||||
},
|
||||
projectFile = {
|
||||
impl = function()
|
||||
ht.project.open_project_file()
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
---@param name string The name of the subcommand
|
||||
---@param subcmd_tbl table<string, haskell-tools.Subcommand> The subcommand's subcommand table
|
||||
local function register_subcommand_tbl(name, subcmd_tbl)
|
||||
command_tbl[name] = {
|
||||
impl = function(args, ...)
|
||||
local subcmd = subcmd_tbl[table.remove(args, 1)]
|
||||
subcmd.impl(args, ...)
|
||||
end,
|
||||
complete = function(subcmd_arg_lead)
|
||||
local subcmd, next_arg_lead = subcmd_arg_lead:match('^(%S+)%s(.*)$')
|
||||
if subcmd and next_arg_lead and subcmd_tbl[subcmd] and subcmd_tbl[subcmd].complete then
|
||||
return subcmd_tbl[subcmd].complete(next_arg_lead)
|
||||
end
|
||||
if subcmd_arg_lead and subcmd_arg_lead ~= '' then
|
||||
return vim
|
||||
.iter(subcmd_tbl)
|
||||
---@param subcmd_name string
|
||||
:filter(function(subcmd_name)
|
||||
return subcmd_name:find(subcmd_arg_lead) ~= nil
|
||||
end)
|
||||
:totable()
|
||||
end
|
||||
return vim.tbl_keys(subcmd_tbl)
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
---@type table<string, haskell-tools.Subcommand>
|
||||
local repl_subcommands = {
|
||||
toggle = {
|
||||
impl = function(args)
|
||||
local filepath = get_filepath_arg(args)
|
||||
ht.repl.toggle(filepath)
|
||||
end,
|
||||
complete = complete_haskell_files,
|
||||
},
|
||||
load = {
|
||||
impl = function(args)
|
||||
local filepath = get_filepath_arg(args)
|
||||
ht.repl.load_file(filepath)
|
||||
end,
|
||||
complete = complete_haskell_files,
|
||||
},
|
||||
quit = {
|
||||
impl = ht.repl.quit,
|
||||
},
|
||||
reload = {
|
||||
impl = ht.repl.reload,
|
||||
},
|
||||
paste_type = {
|
||||
impl = function(args)
|
||||
local reg = get_single_opt_arg(args)
|
||||
ht.repl.paste_type(reg)
|
||||
end,
|
||||
},
|
||||
cword_type = {
|
||||
impl = ht.repl.cword_type,
|
||||
},
|
||||
paste_info = {
|
||||
impl = function(args)
|
||||
local reg = get_single_opt_arg(args)
|
||||
ht.repl.paste_info(reg)
|
||||
end,
|
||||
},
|
||||
cword_info = {
|
||||
impl = ht.repl.cword_info,
|
||||
},
|
||||
}
|
||||
|
||||
-- TODO: Smarter completions. load, quit and reload should only be suggested when a repl is active
|
||||
register_subcommand_tbl('repl', repl_subcommands)
|
||||
|
||||
local log_command_tbl = {
|
||||
openHlsLog = {
|
||||
impl = function()
|
||||
ht.log.nvim_open_hls_logfile()
|
||||
end,
|
||||
},
|
||||
openLog = {
|
||||
impl = function()
|
||||
require('haskell-tools').log.nvim_open_logfile()
|
||||
end,
|
||||
},
|
||||
setLevel = {
|
||||
impl = function(args)
|
||||
local level = vim.fn.expand(args[1])
|
||||
---@cast level string
|
||||
require('haskell-tools').log.set_level(tonumber(level) or level)
|
||||
end,
|
||||
complete = function(arg_lead)
|
||||
local levels = vim.tbl_keys(vim.log.levels)
|
||||
return vim.tbl_filter(function(command)
|
||||
return command:find(arg_lead) ~= nil
|
||||
end, levels)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
register_subcommand_tbl('log', log_command_tbl)
|
||||
|
||||
---@generic K, V
|
||||
---@param predicate fun(V):boolean
|
||||
---@param tbl table<K, V>
|
||||
---@return K[]
|
||||
local function tbl_keys_by_value_filter(predicate, tbl)
|
||||
local ret = {}
|
||||
for k, v in pairs(tbl) do
|
||||
if predicate(v) then
|
||||
ret[k] = v
|
||||
end
|
||||
end
|
||||
return vim.tbl_keys(ret)
|
||||
end
|
||||
|
||||
local function haskell_cmd(opts)
|
||||
local fargs = opts.fargs
|
||||
local cmd = fargs[1]
|
||||
local args = #fargs > 1 and vim.list_slice(fargs, 2, #fargs) or {}
|
||||
local command = command_tbl[cmd]
|
||||
if not command then
|
||||
vim.notify('Haskell: Unknown command: ' .. cmd, vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
command.impl(args, opts)
|
||||
end
|
||||
|
||||
function HtCommands.init()
|
||||
vim.api.nvim_create_user_command('Haskell', haskell_cmd, {
|
||||
nargs = '+',
|
||||
desc = 'haskell-tools.nvim commands',
|
||||
complete = function(arg_lead, cmdline, _)
|
||||
local commands = cmdline:match("^['<,'>]*Haskell!") ~= nil
|
||||
-- bang!
|
||||
and tbl_keys_by_value_filter(function(command)
|
||||
return command.bang == true
|
||||
end, command_tbl)
|
||||
or vim.tbl_keys(command_tbl)
|
||||
local subcmd, subcmd_arg_lead = cmdline:match("^['<,'>]*Haskell[!]*%s(%S+)%s(.*)$")
|
||||
if subcmd and subcmd_arg_lead and command_tbl[subcmd] and command_tbl[subcmd].complete then
|
||||
return command_tbl[subcmd].complete(subcmd_arg_lead)
|
||||
end
|
||||
if cmdline:match("^['<,'>]*Haskell[!]*%s+%w*$") then
|
||||
return vim.tbl_filter(function(command)
|
||||
return command:find(arg_lead) ~= nil
|
||||
end, commands)
|
||||
end
|
||||
end,
|
||||
bang = false, -- might change
|
||||
})
|
||||
end
|
||||
|
||||
return HtCommands
|
||||
Reference in New Issue
Block a user