diff --git a/.vscode/settings.json b/.vscode/settings.json index 7acbf77..507676d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,6 +3,7 @@ "DCONF", "mktemp", "Neovim", - "nvim" + "nvim", + "vimscript" ] } diff --git a/docs/index.md b/docs/index.md index 5b295a4..41cc1c0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,7 +5,6 @@ I've formatted all the tables to look uniform when not using word wrapping. # Custom Unix Terminal - This document serves as a guide for how I customize my terminal in macOS and Linux. It includes a variety of configurations, settings, and programs that I find helpful for my daily workflow. The document is divided into several sections, each focusing on a different aspect of terminal customization. ## Useful Programs @@ -17,7 +16,7 @@ The **TPPM** section features programs that can be installed using package manag 1. While most of these programs can be installed via `git`, they will only be marked as such if recommended by the program's documentation or myself, or if it's the only available installation method. -The **NPM** section lists programs that can be installed using the system's default package manager. Since the primary Debian- and Arch-based Linux based distributions, all the programs in this section are confirmed to be installable via `apt` or `pacman`. For other Linux distributions, you can check [Repology](https://repology.org/) to see if the program is available in your distribution's package manager. Similar to the **TPPM** section, I've included additional information such as a brief description for each program and a link to its Repology page. +The **NPM** section lists programs that can be installed using the system's default package manager. Since the Linux distributions that I primarily use are Debian- and Arch-based, all the programs in this section are confirmed to be installable via `apt` or `pacman`. For other Linux distributions, you can check [Repology](https://repology.org/) to see if the program is available in your distribution's package manager. Similar to the **TPPM** section, I've included additional information such as a brief description for each program and a link to its Repology page. /// tab | Third Party Package Manager @@ -26,6 +25,7 @@ The **NPM** section lists programs that can be installed using the system's defa /// /// tab | Native Package Manager + Applicable Operating Systems: Linux {{ read_csv("includes/csv/useful-packages-npm.csv") }} @@ -171,13 +171,28 @@ If you prefer a simpler setup without all the features provided by plugins, you --8<-- "includes/neovim-init-files/neovim-init-non-vim-plug.vim" ``` -### Neovim GitHub Copilot +### Syntax Highlighting + +Neovim leverages [TreeSitter](https://github.com/tree-sitter/tree-sitter) to provide features such as advanced syntax highlighting, offering more precision and speed compared to traditional regex-based methods. However, its default installation includes only a limited set of parsers for programming languages. This is where the [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) plugin shines. Acting as an enhanced interface for TreeSitter, `nvim-treesitter` provides: + +- **Parser Management**: It automatically handles downloading, installing, and updating TreeSitter parsers for a wide range of languages. +- **Enhanced Syntax Highlighting**: With custom configurations, it delivers consistent and accurate syntax highlighting tailored to each language. +- **Advanced Code Features**: In addition to highlighting, it enables and enhances features like structural code navigation, incremental selection, code folding, and extensions like rainbow parentheses. + +Below are my configurations for `nvim-treesitter` in Neovim. Currently, they ensure that the specified parsers are automatically installed and loaded. To use these settings, add the following code to `~/.config/nvim/second_init.lua` (1): +{ .annotate } + +1. `nvim-treesitter` requires Lua to function. As a result, the configurations are written in Lua and stored in a separate file, `second_init.lua`. My `init.vim` file, as displayed [above](#with-plugins), sources this Lua file to enable the necessary settings. -...coming soon... +```lua title="second_init.lua" +--8<-- "includes/neovim-init-files/neovim-init-lua.lua" +``` -### Installed TreeSitter Parsers +If you're **NOT** using the `init.vim` file that I provided [above](#with-plugins), and your `init` file is written in vimscript, you'll want to add the following code to your `init.vim` file: -...coming soon... +```vim title="init.vim" +lua dofile(vim.fn.stdpath('config') .. '/second_init.lua') +``` ## Terminal Profile diff --git a/utils/__init__.py b/utils/__init__.py index 99bd79a..f5f9e73 100644 --- a/utils/__init__.py +++ b/utils/__init__.py @@ -1,3 +1,3 @@ -__version__ = "1.0.2" +__version__ = "1.0.3" __author__ = "Hunter T. (StrangeRanger)" -__license__ = "MIT" \ No newline at end of file +__license__ = "MIT" diff --git a/utils/constants.py b/utils/constants.py index 1407d15..44c2a35 100644 --- a/utils/constants.py +++ b/utils/constants.py @@ -43,8 +43,8 @@ ) ZSH_ALIAS_MARKERS = Markers( - start_marker="####[[ Aliases ]]", - end_marker="####[[ Environmental Variables ]]", + start_marker="####[ Aliases ]", + end_marker="####[ Environmental Variables ]", ) # NOTE: This is an "estimated" value, that relies on the position of comments and other @@ -67,4 +67,4 @@ MKDOCS_LS_COLORS_MARKERS = Markers( start_marker="# --8<-- [start:ls_colors]\n", end_marker="# --8<-- [end:ls_colors]\n", -) \ No newline at end of file +)