From 21e59c5ca8a5b35671cd0e815c2e817b204684c3 Mon Sep 17 00:00:00 2001 From: Anton Trunov Date: Wed, 5 Mar 2025 11:06:26 +0400 Subject: [PATCH 1/2] fix: polish README.md --- README.md | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index d1d4598..1247a0d 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ Tact.Vim -🚀 Adds syntax highlighting, grammar completion and miscellaneous support for the [Tact programming language](https://tact-lang.org/) to Vim 8+ and Neovim. +🚀 Adds syntax highlighting, grammar completion, and miscellaneous support for the [Tact programming language](https://tact-lang.org/) to Vim 8+ and Neovim. -⚡ Tact is a new programming language for TON blockchain that is focused on efficiency and simplicity. It is designed to be easy to learn and use, and to be a good fit for smart contracts, because it is a statically typed language with a simple syntax and a powerful type system. +⚡ Tact is a new programming language for TON blockchain focused on efficiency and simplicity. It is designed to be easy to learn and use and to be a good fit for smart contracts because it is a statically typed language with a simple syntax and a powerful type system. ## Features @@ -16,10 +16,10 @@ - [Compiler integration support](#usage) - [Abbreviations](#abbreviations) in INSERT mode - [Auto-completion](#completion) (omnifunc/completefunc) support of static (global) and extension (methods on types) functions from stdlib, and all of the basic grammar \ - (use `ctrl-x ctrl-o` to trigger it or setup shortcuts as you wish) -- Basic linting, which automatically triggers on omnicompletion. Don't forget to close your braces {}, parenthesis () and names, or use keyword completion instead ;) + (use `ctrl-x ctrl-o` to trigger it or set shortcuts as you wish) +- Basic linting, which automatically triggers on omnicompletion. Don't forget to close your braces {}, parenthesis (), and names, or use keyword completion instead ;) -See the highlighting showcase below (uses `One Dark` color scheme).\ +See the highlighting showcase below (uses the `One Dark` color scheme).\ Note, that you can [disable highlighting of identifiers](#highlighting), if you want to :) Highlighting showcase @@ -33,19 +33,19 @@ Note, that you can [disable highlighting of identifiers](#highlighting), if you
Click to see -Assuming you don't have any configuration in the `.vimrc` file, it's nicer to setup some sane defaults first before using this (or any other) plugin. Also, the following mini-guide will use the built-in package management for Vim 8+ and won't introduce anything fancy. +Assuming you don't have any configuration in the `.vimrc` file, setting up some sane defaults is nicer before using this (or any other) plugin. Also, the following mini-guide will use the built-in package management for Vim 8+ and won't introduce anything fancy. Steps: 1. Get yourself a Vim of version 8+ installed and make sure to have git installed and present on your path as well 2. Create a `~/.vimrc` file (or `~/_vimrc` if you're on Windows) -3. Without such file there were sourced defaults by the Vim authors, but once it's created, we have to put them back explicitly by adding those lines in and saving changes :w: +3. Without such a file, there were sourced defaults by the Vim authors, but once it's created, we have to put them back explicitly by adding those lines in and saving changes :w: ```vim unlet! skip_defaults_vim source $VIMRUNTIME/defaults.vim ``` -4. While we're here, let's add some `tact.vim`-specific stuff in as well. This time save and quit as we no longer need to add anything (:wq): +4. While here, let's add some `tact. vim'- specific stuff. This time save and quit as we no longer need to add anything (:wq): ```vim let g:tact_style_guide = 1 " Enabling default indentation style @@ -54,7 +54,7 @@ let g:tact_style_guide = 1 " Enabling default indentation style inoremap " Open completion menu on ctrl-space ``` -Note: on macOS the `` is already bound in the system, so unless the terminal intercepts it you'll have to use a different keybinding. +Note: on macOS, the `` is already bound in the system, so unless the terminal intercepts it, you'll have to use a different keybinding. 5. It's also nice to source in the extended defaults provided by the [tpope/vim-sensible](https://github.com/tpope/vim-sensible). To do so, let's use the built-in package manager: @@ -86,7 +86,7 @@ git clone 'https://github.com/tact-lang/tact.vim.git' $HOME\vimfiles\pack\tact-l vim -u NONE -c 'helptags $HOME\vimfiles\pack\tact-lang\start\tact\doc' -c q ``` -7. Start the Vim in the [valid Tact project](https://docs.tact-lang.org/) to be able to use `:Tact` command for easy compilation or simply provide any `.tact` file otherwise. Happy coding 🚀 +7. Start the Vim in the [valid Tact project](https://docs.tact-lang.org/) to use the `:Tact` command for easy compilation or otherwise provide any `.tact` file. Happy coding 🚀
@@ -95,7 +95,7 @@ vim -u NONE -c 'helptags $HOME\vimfiles\pack\tact-lang\start\tact\doc' -c q
Click to see -This is the recommended installation method if you use at least Vim 8 and you don't use another package manager. +It is the recommended installation method if you use at least Vim 8 and you don't use another package manager. More about Vim's built-in package manager: [`:help packages`](https://vimhelp.org/repeat.txt.html#packages). For Linux/macOS: @@ -199,9 +199,9 @@ Get an official one here: [tact-language-server](https://github.com/tact-lang/ta ### Completion -By default this plugin sets an `omnifunc` option to provide auto-completions by triggering CTRL-xCTRL-o in INSERT mode. However, if you're using an LSP client for Tact language, it may overwrite this option and disable the completion and basic linting capabilities provided by this plugin alongside of it. +By default this plugin sets an `omnifunc` option to provide auto-completions by triggering CTRL-xCTRL-o in INSERT mode. However, if you're using an LSP client for Tact language, it may overwrite this option and turn off the completion and basic linting capabilities provided by this plugin alongside it. -In order to prevent that behaviour you may want to bind completion features of this plugin to a `competefunc` option (which is quite conveniently triggered by CTRL-xCTRL-u in INSERT mode). Add the following to your `~/.vimrc` (or `~/_vimrc` on Windows) if you'd like to prefer and bind `completefunc` over `omnifunc`: +To prevent that behavior, you may want to bind the completion features of this plugin to a `competefunc` option (which is quite conveniently triggered by CTRL-xCTRL-u in INSERT mode). Add the following to your `~/.vimrc` (or `~/_vimrc` on Windows) if you'd like to prefer and bind `completefunc` over `omnifunc`: ```vim " CTRL-x CTRL-u instead of CTRL-x CTRL-o @@ -236,7 +236,7 @@ require('lazy').setup({ ### Indentation -Add the following to your `~/.vimrc` (or `~/_vimrc` on Windows) to enable preferred indentation style for Tact: +Add the following to your `~/.vimrc` (or `~/_vimrc` on Windows) to enable the preferred indentation style for Tact: ```vim let g:tact_style_guide = 1 @@ -270,7 +270,7 @@ require('lazy').setup({ ### Highlighting -If you want to disable highlighting of identifiers: variables and constants (but not structures), add the following option: +If you want to turn off highlighting of identifiers: variables, and constants (but not structures), add the following option: ```vim let g:tact_blank_identifiers = 1 @@ -302,7 +302,7 @@ require('lazy').setup({
-To disable highlighting of structures (names of traits, messages, contracts and structs), add the following: +To turn off highlighting of structures (names of traits, messages, contracts, and structs), add the following: ```vim let g:tact_blank_structures = 1 @@ -336,11 +336,11 @@ require('lazy').setup({ ### Formatting -Basic code formatting can be done by a series of Vim motions: `gg=G` (plus Ctrl-o twice to return to the original cursor position), or by invoking a `:TactFmt` command, which does all that for you *without* messing up with your cursor. Use both with caution, as Vim-native indentation handling is known to be prone to errors. +A series of Vim motions can do basic code formatting: `gg=G` (plus Ctrl-o twice to return to the original cursor position) or by invoking a `:TactFmt` command, which does all that for you *without* messing up with your cursor. Use both with caution, as Vim-native indentation handling is known to be prone to errors. ### Folding -To enable code-folding add the following snippet. This one might have an impact on editing performance, proceed with +To enable code-folding, add the following snippet. This one might have an impact on editing performance; proceed with caution: ```vim @@ -357,14 +357,14 @@ Make a `~/.config/nvim/after/ftplugin` directory (`~/AppData/Local/nvim/after/ft ```lua vim.opt.foldmethod = "syntax" -vim.opt.foldenable = false -- disables automatic folding on file opening +vim.opt.foldenable = false -- turn off automatic folding on file opening ``` ### Abbreviations -To trigger an abbreviation, type it in followed by punctuation such as a space or comma, and it would get expanded into a code snippet. It's advised to use space for this as it usually produces best results. +To trigger an abbreviation, type it in followed by punctuation such as a space or comma, and it will expand into a code snippet. It's advised to use space for this, as it usually produces the best results. These abbreviations (and auto-completions of their names) are available right away: @@ -378,7 +378,7 @@ These abbreviations (and auto-completions of their names) are available right aw 1. `a_me` — expands to the message declaration 1. `a_se` — expands to send(SendParameters{...}) call -**Keep in mind** that abbreviations are always there and you can always type them in, even if they're not shown by omnicompletion when deemed not suitable for the current completion context. +**Keep in mind** that abbreviations are always there, and you can always type them in, even if they're not shown by omnicompletion when deemed unsuitable for the current completion context. To avoid expansion in INSERT mode, type Ctrl-V after the last character of the abbreviation (on Windows, type Ctrl-Q instead of Ctrl-V). @@ -416,7 +416,7 @@ require('lazy').setup({ ### Linting -Simply run `:Tact` command to try to compile using Tacts' compiler and look for errors. See [Usage section](#usage) for more info on the command. +Simply run the `:Tact` command to try compiling using Tacts' compiler and look for errors. See the [Usage section](#usage) for more info on the command. ### Miscellaneous @@ -436,18 +436,18 @@ vim.keymap.set('i', '', '', { noremap = true, silent = true}) -Note, that on macOS there's a default system-wide keyboard shortcut for CtrlSpace (`^space`). You may want to change it to be CmdSpace instead or use the different binding in Vim. +Note that on macOS, there's a default system-wide keyboard shortcut for CtrlSpace (`^space`). You may want to change it to CmdSpace instead or use the different binding in Vim. At times when omnicompletion (CTRL-xCTRL-o) can't complete much it fallbacks to keyword completion (CTRL-xCTRL-n). But that's not always the case, so if omnicompletion doesn't show anything, try keyword one! ## Usage -For your convenience there's a `:Tact` command available whenever you open any `.tact` files. It tries to run the `build` script from your `package.json` project file, which, as shown in [this official example here](https://docs.tact-lang.org/start#getting-started-from-scratch), should invoke a Tact compiler. You're expected to have a Node.js of the current LTS (or later) version installed on your system, alongside of `npm` for the `:Tact` command to work. +For your convenience, a `:Tact` command is available whenever you open any `.tact` files. It tries to run the `build` script from your `package.json` project file, which, as shown in [this official example here](https://docs.tact-lang.org/start#getting-started-from-scratch), should invoke a Tact compiler. You're expected to have a Node.js of the current LTS (or later) version installed on your system, alongside `npm` for the `:Tact` command to work. -It's generally recommended to go over the [example](https://docs.tact-lang.org/start#getting-started-from-scratch), as it shows how to get started with Tact. -Alternatively, use the [official project template](https://github.com/tact-lang/tact-template): either copy or create a new repository based off of it. +It's generally recommended that you go over the [example](https://docs.tact-lang.org/start#getting-started-from-scratch), which shows how to get started with Tact. +Alternatively, use the [official project template](https://github.com/tact-lang/tact-template ): either copy it or create a new repository based on it. -Wish you good luck and fun exploring Tact! ⚡ +We wish you good luck and fun exploring Tact! ⚡ ## Useful Tact links From f694267f3a983adf595ce08c6f6e79c54ae4c9b9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Mar 2025 07:09:38 +0000 Subject: [PATCH 2/2] chore: auto-generate vimdoc via panvimdoc --- doc/headless-readme.md | 54 +++++++++++++-------------- doc/tact.txt | 85 +++++++++++++++++++++--------------------- 2 files changed, 69 insertions(+), 70 deletions(-) diff --git a/doc/headless-readme.md b/doc/headless-readme.md index 57530fb..966e1b2 100644 --- a/doc/headless-readme.md +++ b/doc/headless-readme.md @@ -1,6 +1,6 @@ -🚀 Adds syntax highlighting, grammar completion and miscellaneous support for the [Tact programming language](https://tact-lang.org/) to Vim 8+ and Neovim. +🚀 Adds syntax highlighting, grammar completion, and miscellaneous support for the [Tact programming language](https://tact-lang.org/) to Vim 8+ and Neovim. -⚡ Tact is a new programming language for TON blockchain that is focused on efficiency and simplicity. It is designed to be easy to learn and use, and to be a good fit for smart contracts, because it is a statically typed language with a simple syntax and a powerful type system. +⚡ Tact is a new programming language for TON blockchain focused on efficiency and simplicity. It is designed to be easy to learn and use and to be a good fit for smart contracts because it is a statically typed language with a simple syntax and a powerful type system. ## Features @@ -10,10 +10,10 @@ - [Compiler integration support](#usage) - [Abbreviations](#abbreviations) in INSERT mode - [Auto-completion](#completion) (omnifunc/completefunc) support of static (global) and extension (methods on types) functions from stdlib, and all of the basic grammar \ - (use `ctrl-x ctrl-o` to trigger it or setup shortcuts as you wish) -- Basic linting, which automatically triggers on omnicompletion. Don't forget to close your braces {}, parenthesis () and names, or use keyword completion instead ;) + (use `ctrl-x ctrl-o` to trigger it or set shortcuts as you wish) +- Basic linting, which automatically triggers on omnicompletion. Don't forget to close your braces {}, parenthesis (), and names, or use keyword completion instead ;) -See the highlighting showcase below (uses `One Dark` color scheme).\ +See the highlighting showcase below (uses the `One Dark` color scheme).\ Note, that you can [disable highlighting of identifiers](#highlighting), if you want to :) Highlighting showcase @@ -27,19 +27,19 @@ Note, that you can [disable highlighting of identifiers](#highlighting), if you
Click to see -Assuming you don't have any configuration in the `.vimrc` file, it's nicer to setup some sane defaults first before using this (or any other) plugin. Also, the following mini-guide will use the built-in package management for Vim 8+ and won't introduce anything fancy. +Assuming you don't have any configuration in the `.vimrc` file, setting up some sane defaults is nicer before using this (or any other) plugin. Also, the following mini-guide will use the built-in package management for Vim 8+ and won't introduce anything fancy. Steps: 1. Get yourself a Vim of version 8+ installed and make sure to have git installed and present on your path as well 2. Create a `~/.vimrc` file (or `~/_vimrc` if you're on Windows) -3. Without such file there were sourced defaults by the Vim authors, but once it's created, we have to put them back explicitly by adding those lines in and saving changes :w: +3. Without such a file, there were sourced defaults by the Vim authors, but once it's created, we have to put them back explicitly by adding those lines in and saving changes :w: ```vim unlet! skip_defaults_vim source $VIMRUNTIME/defaults.vim ``` -4. While we're here, let's add some `tact.vim`-specific stuff in as well. This time save and quit as we no longer need to add anything (:wq): +4. While here, let's add some `tact. vim'- specific stuff. This time save and quit as we no longer need to add anything (:wq): ```vim let g:tact_style_guide = 1 " Enabling default indentation style @@ -48,7 +48,7 @@ let g:tact_style_guide = 1 " Enabling default indentation style inoremap " Open completion menu on ctrl-space ``` -Note: on macOS the `` is already bound in the system, so unless the terminal intercepts it you'll have to use a different keybinding. +Note: on macOS, the `` is already bound in the system, so unless the terminal intercepts it, you'll have to use a different keybinding. 5. It's also nice to source in the extended defaults provided by the [tpope/vim-sensible](https://github.com/tpope/vim-sensible). To do so, let's use the built-in package manager: @@ -80,7 +80,7 @@ git clone 'https://github.com/tact-lang/tact.vim.git' $HOME\vimfiles\pack\tact-l vim -u NONE -c 'helptags $HOME\vimfiles\pack\tact-lang\start\tact\doc' -c q ``` -7. Start the Vim in the [valid Tact project](https://docs.tact-lang.org/) to be able to use `:Tact` command for easy compilation or simply provide any `.tact` file otherwise. Happy coding 🚀 +7. Start the Vim in the [valid Tact project](https://docs.tact-lang.org/) to use the `:Tact` command for easy compilation or otherwise provide any `.tact` file. Happy coding 🚀
@@ -89,7 +89,7 @@ vim -u NONE -c 'helptags $HOME\vimfiles\pack\tact-lang\start\tact\doc' -c q
Click to see -This is the recommended installation method if you use at least Vim 8 and you don't use another package manager. +It is the recommended installation method if you use at least Vim 8 and you don't use another package manager. More about Vim's built-in package manager: [`:help packages`](https://vimhelp.org/repeat.txt.html#packages). For Linux/macOS: @@ -193,9 +193,9 @@ Get an official one here: [tact-language-server](https://github.com/tact-lang/ta ### Completion -By default this plugin sets an `omnifunc` option to provide auto-completions by triggering CTRL-xCTRL-o in INSERT mode. However, if you're using an LSP client for Tact language, it may overwrite this option and disable the completion and basic linting capabilities provided by this plugin alongside of it. +By default this plugin sets an `omnifunc` option to provide auto-completions by triggering CTRL-xCTRL-o in INSERT mode. However, if you're using an LSP client for Tact language, it may overwrite this option and turn off the completion and basic linting capabilities provided by this plugin alongside it. -In order to prevent that behaviour you may want to bind completion features of this plugin to a `competefunc` option (which is quite conveniently triggered by CTRL-xCTRL-u in INSERT mode). Add the following to your `~/.vimrc` (or `~/_vimrc` on Windows) if you'd like to prefer and bind `completefunc` over `omnifunc`: +To prevent that behavior, you may want to bind the completion features of this plugin to a `competefunc` option (which is quite conveniently triggered by CTRL-xCTRL-u in INSERT mode). Add the following to your `~/.vimrc` (or `~/_vimrc` on Windows) if you'd like to prefer and bind `completefunc` over `omnifunc`: ```vim " CTRL-x CTRL-u instead of CTRL-x CTRL-o @@ -230,7 +230,7 @@ require('lazy').setup({ ### Indentation -Add the following to your `~/.vimrc` (or `~/_vimrc` on Windows) to enable preferred indentation style for Tact: +Add the following to your `~/.vimrc` (or `~/_vimrc` on Windows) to enable the preferred indentation style for Tact: ```vim let g:tact_style_guide = 1 @@ -264,7 +264,7 @@ require('lazy').setup({ ### Highlighting -If you want to disable highlighting of identifiers: variables and constants (but not structures), add the following option: +If you want to turn off highlighting of identifiers: variables, and constants (but not structures), add the following option: ```vim let g:tact_blank_identifiers = 1 @@ -296,7 +296,7 @@ require('lazy').setup({
-To disable highlighting of structures (names of traits, messages, contracts and structs), add the following: +To turn off highlighting of structures (names of traits, messages, contracts, and structs), add the following: ```vim let g:tact_blank_structures = 1 @@ -330,11 +330,11 @@ require('lazy').setup({ ### Formatting -Basic code formatting can be done by a series of Vim motions: `gg=G` (plus Ctrl-o twice to return to the original cursor position), or by invoking a `:TactFmt` command, which does all that for you *without* messing up with your cursor. Use both with caution, as Vim-native indentation handling is known to be prone to errors. +A series of Vim motions can do basic code formatting: `gg=G` (plus Ctrl-o twice to return to the original cursor position) or by invoking a `:TactFmt` command, which does all that for you *without* messing up with your cursor. Use both with caution, as Vim-native indentation handling is known to be prone to errors. ### Folding -To enable code-folding add the following snippet. This one might have an impact on editing performance, proceed with +To enable code-folding, add the following snippet. This one might have an impact on editing performance; proceed with caution: ```vim @@ -351,14 +351,14 @@ Make a `~/.config/nvim/after/ftplugin` directory (`~/AppData/Local/nvim/after/ft ```lua vim.opt.foldmethod = "syntax" -vim.opt.foldenable = false -- disables automatic folding on file opening +vim.opt.foldenable = false -- turn off automatic folding on file opening ``` ### Abbreviations -To trigger an abbreviation, type it in followed by punctuation such as a space or comma, and it would get expanded into a code snippet. It's advised to use space for this as it usually produces best results. +To trigger an abbreviation, type it in followed by punctuation such as a space or comma, and it will expand into a code snippet. It's advised to use space for this, as it usually produces the best results. These abbreviations (and auto-completions of their names) are available right away: @@ -372,7 +372,7 @@ These abbreviations (and auto-completions of their names) are available right aw 1. `a_me` — expands to the message declaration 1. `a_se` — expands to send(SendParameters{...}) call -**Keep in mind** that abbreviations are always there and you can always type them in, even if they're not shown by omnicompletion when deemed not suitable for the current completion context. +**Keep in mind** that abbreviations are always there, and you can always type them in, even if they're not shown by omnicompletion when deemed unsuitable for the current completion context. To avoid expansion in INSERT mode, type Ctrl-V after the last character of the abbreviation (on Windows, type Ctrl-Q instead of Ctrl-V). @@ -410,7 +410,7 @@ require('lazy').setup({ ### Linting -Simply run `:Tact` command to try to compile using Tacts' compiler and look for errors. See [Usage section](#usage) for more info on the command. +Simply run the `:Tact` command to try compiling using Tacts' compiler and look for errors. See the [Usage section](#usage) for more info on the command. ### Miscellaneous @@ -430,18 +430,18 @@ vim.keymap.set('i', '', '', { noremap = true, silent = true}) -Note, that on macOS there's a default system-wide keyboard shortcut for CtrlSpace (`^space`). You may want to change it to be CmdSpace instead or use the different binding in Vim. +Note that on macOS, there's a default system-wide keyboard shortcut for CtrlSpace (`^space`). You may want to change it to CmdSpace instead or use the different binding in Vim. At times when omnicompletion (CTRL-xCTRL-o) can't complete much it fallbacks to keyword completion (CTRL-xCTRL-n). But that's not always the case, so if omnicompletion doesn't show anything, try keyword one! ## Usage -For your convenience there's a `:Tact` command available whenever you open any `.tact` files. It tries to run the `build` script from your `package.json` project file, which, as shown in [this official example here](https://docs.tact-lang.org/start#getting-started-from-scratch), should invoke a Tact compiler. You're expected to have a Node.js of the current LTS (or later) version installed on your system, alongside of `npm` for the `:Tact` command to work. +For your convenience, a `:Tact` command is available whenever you open any `.tact` files. It tries to run the `build` script from your `package.json` project file, which, as shown in [this official example here](https://docs.tact-lang.org/start#getting-started-from-scratch), should invoke a Tact compiler. You're expected to have a Node.js of the current LTS (or later) version installed on your system, alongside `npm` for the `:Tact` command to work. -It's generally recommended to go over the [example](https://docs.tact-lang.org/start#getting-started-from-scratch), as it shows how to get started with Tact. -Alternatively, use the [official project template](https://github.com/tact-lang/tact-template): either copy or create a new repository based off of it. +It's generally recommended that you go over the [example](https://docs.tact-lang.org/start#getting-started-from-scratch), which shows how to get started with Tact. +Alternatively, use the [official project template](https://github.com/tact-lang/tact-template ): either copy it or create a new repository based on it. -Wish you good luck and fun exploring Tact! ⚡ +We wish you good luck and fun exploring Tact! ⚡ ## Useful Tact links diff --git a/doc/tact.txt b/doc/tact.txt index 83d59ad..f2d2310 100644 --- a/doc/tact.txt +++ b/doc/tact.txt @@ -10,13 +10,13 @@ Table of Contents *tact-table-of-contents* - UsefulTact links |tact-usefultact-links| - Credits |tact-credits| - License |tact-license| -Adds syntax highlighting, grammar completion and miscellaneous support for the +Adds syntax highlighting, grammar completion, and miscellaneous support for the Tact programming language to Vim 8+ and Neovim. -Tact is a new programming language for TON blockchain that is focused on -efficiency and simplicity. It is designed to be easy to learn and use, and to -be a good fit for smart contracts, because it is a statically typed language -with a simple syntax and a powerful type system. +Tact is a new programming language for TON blockchain focused on efficiency and +simplicity. It is designed to be easy to learn and use and to be a good fit for +smart contracts because it is a statically typed language with a simple syntax +and a powerful type system. FEATURES *tact-features* @@ -27,11 +27,11 @@ FEATURES *tact-features* - |tact-compiler-integration-support| - |tact-abbreviations| in INSERT mode - |tact-auto-completion| (omnifunc/completefunc) support of static (global) and extension (methods on types) functions from stdlib, and all of the basic grammar - (use `ctrl-x ctrl-o` to trigger it or setup shortcuts as you wish) -- Basic linting, which automatically triggers on omnicompletion. Don’t forget to close your braces {}, parenthesis () and names, or use keyword completion instead ;) + (use `ctrl-x ctrl-o` to trigger it or set shortcuts as you wish) +- Basic linting, which automatically triggers on omnicompletion. Don’t forget to close your braces {}, parenthesis (), and names, or use keyword completion instead ;) -See the highlighting showcase below (uses `One Dark` color scheme). Note, that -you can |tact-disable-highlighting-of-identifiers|, if you want to :) +See the highlighting showcase below (uses the `One Dark` color scheme). Note, +that you can |tact-disable-highlighting-of-identifiers|, if you want to :) @@ -118,12 +118,11 @@ COMPLETION ~ By default this plugin sets an `omnifunc` option to provide auto-completions by triggering CTRL-xCTRL-o in INSERT mode. However, if you’re using an LSP -client for Tact language, it may overwrite this option and disable the -completion and basic linting capabilities provided by this plugin alongside of -it. +client for Tact language, it may overwrite this option and turn off the +completion and basic linting capabilities provided by this plugin alongside it. -In order to prevent that behaviour you may want to bind completion features of -this plugin to a `competefunc` option (which is quite conveniently triggered by +To prevent that behavior, you may want to bind the completion features of this +plugin to a `competefunc` option (which is quite conveniently triggered by CTRL-xCTRL-u in INSERT mode). Add the following to your `~/.vimrc` (or `~/_vimrc` on Windows) if you’d like to prefer and bind `completefunc` over `omnifunc` @@ -159,7 +158,7 @@ Alternatively,add the following to the `init` key of your `lazy.nvim` config: INDENTATION ~ -Add the following to your `~/.vimrc` (or `~/_vimrc` on Windows) to enable +Add the following to your `~/.vimrc` (or `~/_vimrc` on Windows) to enable the preferred indentation style for Tact: >vim @@ -192,7 +191,7 @@ Alternatively, add the following to the `init` key of your `lazy.nvim` config: HIGHLIGHTING ~ -If you want to disable highlighting of identifiers: variables and constants +If you want to turn off highlighting of identifiers: variables, and constants (but not structures), add the following option: >vim @@ -222,8 +221,8 @@ Alternatively, add the following to the `init` key of your `lazy.nvim` config: }, {}) < -To disable highlighting of structures (names of traits, messages, contracts and -structs), add the following: +To turn off highlighting of structures (names of traits, messages, contracts, +and structs), add the following: >vim let g:tact_blank_structures = 1 @@ -255,17 +254,17 @@ Alternatively, add the following to the `init` key of your `lazy.nvim` config: FORMATTING ~ -Basic code formatting can be done by a series of Vim motions: `gg=G` (plus -Ctrl-o twice to return to the original cursor position), or by invoking a -`:TactFmt` command, which does all that for you _without_ messing up with your -cursor. Use both with caution, as Vim-native indentation handling is known to -be prone to errors. +A series of Vim motions can do basic code formatting: `gg=G` (plus Ctrl-o twice +to return to the original cursor position) or by invoking a `:TactFmt` command, +which does all that for you _without_ messing up with your cursor. Use both +with caution, as Vim-native indentation handling is known to be prone to +errors. FOLDING ~ -To enable code-folding add the following snippet. This one might have an impact -on editing performance, proceed with caution: +To enable code-folding, add the following snippet. This one might have an +impact on editing performance; proceed with caution: >vim augroup tact_folding @@ -282,15 +281,15 @@ the following contents: >lua vim.opt.foldmethod = "syntax" - vim.opt.foldenable = false -- disables automatic folding on file opening + vim.opt.foldenable = false -- turn off automatic folding on file opening < ABBREVIATIONS ~ To trigger an abbreviation, type it in followed by punctuation such as a space -or comma, and it would get expanded into a code snippet. It’s advised to use -space for this as it usually produces best results. +or comma, and it will expand into a code snippet. It’s advised to use space +for this, as it usually produces the best results. These abbreviations (and auto-completions of their names) are available right away: @@ -305,8 +304,8 @@ away: 8. `a_me` — expands to the message declaration 9. `a_se` — expands to send(SendParameters{…}) call -**Keep in mind** that abbreviations are always there and you can always type -them in, even if they’re not shown by omnicompletion when deemed not suitable +**Keep in mind** that abbreviations are always there, and you can always type +them in, even if they’re not shown by omnicompletion when deemed unsuitable for the current completion context. To avoid expansion in INSERT mode, type Ctrl-V after the last character of the @@ -345,8 +344,8 @@ Alternatively, add the following to the `init` key of your `lazy.nvim` config: LINTING ~ -Simply run `:Tact` command to try to compile using Tacts’ compiler and look -for errors. See |tact-usage-section| for more info on the command. +Simply run the `:Tact` command to try compiling using Tacts’ compiler and +look for errors. See the |tact-usage-section| for more info on the command. MISCELLANEOUS ~ @@ -365,9 +364,9 @@ Neovim-only ~ vim.keymap.set('i', '', '', { noremap = true, silent = true}) < -Note, that on macOS there’s a default system-wide keyboard shortcut for -CtrlSpace (`^space`). You may want to change it to be CmdSpace instead or use -the different binding in Vim. +Note that on macOS, there’s a default system-wide keyboard shortcut for +CtrlSpace (`^space`). You may want to change it to CmdSpace instead or use the +different binding in Vim. At times when omnicompletion (CTRL-xCTRL-o) can’t complete much it fallbacks to keyword completion (CTRL-xCTRL-n). But that’s not always the case, so if @@ -376,21 +375,21 @@ omnicompletion doesn’t show anything, try keyword one! USAGE *tact-usage* -For your convenience there’s a `:Tact` command available whenever you open -any `.tact` files. It tries to run the `build` script from your `package.json` +For your convenience, a `:Tact` command is available whenever you open any +`.tact` files. It tries to run the `build` script from your `package.json` project file, which, as shown in this official example here , should invoke a Tact compiler. You’re expected to have a Node.js of the current LTS (or -later) version installed on your system, alongside of `npm` for the `:Tact` +later) version installed on your system, alongside `npm` for the `:Tact` command to work. -It’s generally recommended to go over the example -, as it shows +It’s generally recommended that you go over the example +, which shows how to get started with Tact. Alternatively, use the official project template -either copy or create a new -repository based off of it. +either copy it or create a new +repository based on it. -Wish you good luck and fun exploring Tact! +We wish you good luck and fun exploring Tact! USEFULTACT LINKS *tact-usefultact-links*