From fe7ed05f0d68c1206f94b4e9f3bb9b1632c90747 Mon Sep 17 00:00:00 2001 From: berkenar1 <73941606+berkenar1@users.noreply.github.com> Date: Thu, 1 Jan 2026 18:27:51 +0300 Subject: [PATCH 1/5] Add FreeBSD support: update treesitter config, disable Mason auto-install, add install script --- README.md | 219 ++++++++++++--------------------------------- init.lua | 76 +++++++++------- install-freebsd.sh | 43 +++++++++ 3 files changed, 142 insertions(+), 196 deletions(-) create mode 100644 install-freebsd.sh diff --git a/README.md b/README.md index 4113950550d..2409f3ae57b 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,23 @@ -# kickstart.nvim +# kickstart.nvim-FreeBSD ## Introduction -A starting point for Neovim that is: +A FreeBSD-optimized fork of [kickstart.nvim](https://github.com/nvim-lua/kickstart.nvim) that is: * Small * Single-file * Completely Documented +* **FreeBSD-Native**: Configured to use system packages instead of Mason auto-install -**NOT** a Neovim distribution, but instead a starting point for your configuration. +**NOT** a Neovim distribution, but instead a starting point for your configuration tailored for FreeBSD. + +## What's Different from Original Kickstart + +This fork includes FreeBSD-specific modifications: +- **No Mason auto-compilation**: Uses system `pkg` packages instead +- **Tree-sitter support**: Configured to use system tree-sitter libraries +- **Tested on FreeBSD**: All plugins verified to work on FreeBSD systems +- **Pre-install script**: Automated dependency installation via `install-freebsd.sh` ## Installation @@ -21,104 +30,79 @@ If you are experiencing issues, please make sure you have the latest versions. ### Install External Dependencies -External Requirements: -- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) +#### FreeBSD (Recommended for FreeBSD users) + +Use the provided installation script to automatically install all dependencies: + +```sh +sudo sh install-freebsd.sh +``` + +Or manually install dependencies: + +```sh +sudo pkg update -f +sudo pkg install -y git gmake unzip llvm ripgrep fd-find tree-sitter stylua base64-by-elvis +``` + +**Note:** `lua-language-server` is not available in FreeBSD pkg repositories, so LSP support for Lua is disabled in this config. + +#### Other External Requirements + +- Basic utils: `git`, `gmake` (FreeBSD uses gmake instead of make), `unzip`, C Compiler (clang via `llvm`) - [ripgrep](https://github.com/BurntSushi/ripgrep#installation), [fd-find](https://github.com/sharkdp/fd#installation) -- Clipboard tool (xclip/xsel/win32yank or other depending on the platform) +- Clipboard tool (xclip/xsel or xclip-freebsd) - A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons - if you have it set `vim.g.have_nerd_font` in `init.lua` to true -- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji` - Language Setup: - If you want to write Typescript, you need `npm` - If you want to write Golang, you will need `go` - etc. -> [!NOTE] -> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes -> and quick install snippets - -### Install Kickstart +### Install Kickstart.nvim-FreeBSD > [!NOTE] > [Backup](#FAQ) your previous configuration (if any exists) -Neovim's configurations are located under the following paths, depending on your OS: - -| OS | PATH | -| :- | :--- | -| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` | -| Windows (cmd)| `%localappdata%\nvim\` | -| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` | - -#### Recommended Step - -[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo -so that you have your own copy that you can modify, then install by cloning the -fork to your machine using one of the commands below, depending on your OS. +Neovim's configuration location on FreeBSD: -> [!NOTE] -> Your fork's URL will be something like this: -> `https://github.com//kickstart.nvim.git` - -You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file -too - it's ignored in the kickstart repo to make maintenance easier, but it's -[recommended to track it in version control](https://lazy.folke.io/usage/lockfile). - -#### Clone kickstart.nvim - -> [!NOTE] -> If following the recommended step above (i.e., forking the repo), replace -> `nvim-lua` with `` in the commands below +``` +~/.config/nvim +``` -
Linux and Mac +#### Clone the Repository ```sh -git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim +git clone https://github.com/YOUR_USERNAME/kickstart.nvim-freebsd.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim +cd ~/.config/nvim ``` -
+#### Install Dependencies -
Windows +Run the automated install script: -If you're using `cmd.exe`: - -``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim" -``` - -If you're using `powershell.exe` - -``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" +```sh +sudo sh install-freebsd.sh ``` -
- -### Post Installation - -Start Neovim +#### Start Neovim and Sync Plugins ```sh nvim ``` -That's it! Lazy will install all the plugins you have. Use `:Lazy` to view -the current plugin status. Hit `q` to close the window. - -#### Read The Friendly Documentation +Inside Neovim, run: -Read through the `init.lua` file in your configuration folder for more -information about extending and exploring Neovim. That also includes -examples of adding popularly requested plugins. - -> [!NOTE] -> For more information about a particular plugin check its repository's documentation. +```vim +:Lazy sync +``` +Wait for plugins to finish installing, then restart Neovim. ### Getting Started -[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o) +Read through the `init.lua` file in your configuration folder for more information about extending and exploring Neovim. ### FAQ @@ -129,13 +113,13 @@ examples of adding popularly requested plugins. * Can I keep my existing configuration in parallel to kickstart? * Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` to maintain multiple configurations. For example, you can install the kickstart - configuration in `~/.config/nvim-kickstart` and create an alias: + configuration in `~/.config/nvim-freebsd` and create an alias: ``` - alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim' + alias nvim-freebsd='NVIM_APPNAME="nvim-freebsd" nvim' ``` - When you run Neovim using `nvim-kickstart` alias it will use the alternative + When you run Neovim using `nvim-freebsd` alias it will use the alternative config directory and the matching local directory - `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim + `~/.local/share/nvim-freebsd`. You can apply this approach to any Neovim distribution that you would like to try out. * What if I want to "uninstall" this configuration: * See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information @@ -146,96 +130,5 @@ examples of adding popularly requested plugins. into smaller parts. A fork of kickstart that does this while maintaining the same functionality is available here: * [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim) - * Discussions on this topic can be found here: - * [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218) - * [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473) - -### Install Recipes - -Below you can find OS specific install instructions for Neovim and dependencies. - -After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step. - -#### Windows Installation - -
Windows with Microsoft C++ Build Tools and CMake -Installation may require installing build tools and updating the run command for `telescope-fzf-native` - -See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) - -This requires: - -- Install CMake and the Microsoft C++ Build Tools on Windows - -```lua -{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' } -``` -
-
Windows with gcc/make using chocolatey -Alternatively, one can install gcc and make which don't require changing the config, -the easiest way is to use choco: - -1. install [chocolatey](https://chocolatey.org/install) -either follow the instructions on the page or use winget, -run in cmd as **admin**: -``` -winget install --accept-source-agreements chocolatey.chocolatey -``` - -2. install all requirements using choco, exit the previous cmd and -open a new one so that choco path is set, and run in cmd as **admin**: -``` -choco install -y neovim git ripgrep wget fd unzip gzip mingw make -``` -
-
WSL (Windows Subsystem for Linux) - -``` -wsl --install -wsl -sudo add-apt-repository ppa:neovim-ppa/unstable -y -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip neovim -``` -
- -#### Linux Install -
Ubuntu Install Steps -``` -sudo add-apt-repository ppa:neovim-ppa/unstable -y -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip neovim -``` -
-
Debian Install Steps - -``` -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip curl - -# Now we install nvim -curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz -sudo rm -rf /opt/nvim-linux-x86_64 -sudo mkdir -p /opt/nvim-linux-x86_64 -sudo chmod a+rX /opt/nvim-linux-x86_64 -sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz - -# make it available in /usr/local/bin, distro installs to /usr/bin -sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/ -``` -
-
Fedora Install Steps - -``` -sudo dnf install -y gcc make git ripgrep fd-find unzip neovim -``` -
- -
Arch Install Steps - -``` -sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim -``` -
diff --git a/init.lua b/init.lua index b98ffc6198a..99da6f9f634 100644 --- a/init.lua +++ b/init.lua @@ -379,7 +379,7 @@ require('lazy').setup({ { 'nvim-telescope/telescope-ui-select.nvim' }, -- Useful for getting pretty icons, but requires a Nerd Font. - { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, + { 'nvim-tree/nvim-web-devicons' }, -- enabled on FreeBSD }, config = function() -- Telescope is a fuzzy finder that comes with a lot of different things that @@ -684,20 +684,21 @@ require('lazy').setup({ -- ts_ls = {}, -- - lua_ls = { - -- cmd = { ... }, - -- filetypes = { ... }, - -- capabilities = {}, - settings = { - Lua = { - completion = { - callSnippet = 'Replace', - }, - -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings - -- diagnostics = { disable = { 'missing-fields' } }, - }, - }, - }, + -- lua_ls = { + -- -- On FreeBSD, install via: pkg install lua-language-server + -- -- cmd = { ... }, + -- -- filetypes = { ... }, + -- -- capabilities = {}, + -- settings = { + -- Lua = { + -- completion = { + -- callSnippet = 'Replace', + -- }, + -- -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings + -- -- diagnostics = { disable = { 'missing-fields' } }, + -- }, + -- }, + -- }, } -- Ensure the servers and tools above are installed @@ -713,10 +714,11 @@ require('lazy').setup({ -- -- You can add other tools here that you want Mason to install -- for you, so that they are available from within Neovim. + -- On FreeBSD, use system packages instead of Mason local ensure_installed = vim.tbl_keys(servers or {}) - vim.list_extend(ensure_installed, { - 'stylua', -- Used to format Lua code - }) + -- vim.list_extend(ensure_installed, { + -- 'stylua', -- Install via: pkg install stylua + -- }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } require('mason-lspconfig').setup { @@ -738,6 +740,7 @@ require('lazy').setup({ { -- Autoformat 'stevearc/conform.nvim', + lazy = false, -- Force eager loading event = { 'BufWritePre' }, cmd = { 'ConformInfo' }, keys = { @@ -940,22 +943,29 @@ require('lazy').setup({ }, { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', - build = ':TSUpdate', - main = 'nvim-treesitter.configs', -- Sets main module to use for opts + -- Disable build on FreeBSD - use system tree-sitter instead + build = false, -- [[ Configure Treesitter ]] See `:help nvim-treesitter` - opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, - -- Autoinstall languages that are not installed - auto_install = true, - highlight = { - enable = true, - -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules. - -- If you are experiencing weird indenting issues, add the language to - -- the list of additional_vim_regex_highlighting and disabled languages for indent. - additional_vim_regex_highlighting = { 'ruby' }, - }, - indent = { enable = true, disable = { 'ruby' } }, - }, + config = function() + local ok, configs = pcall(require, 'nvim-treesitter.configs') + if not ok then + vim.notify('nvim-treesitter not properly installed. Run :Lazy sync', vim.log.levels.WARN) + return + end + configs.setup { + ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, + -- Disable autoinstall on FreeBSD - use system parsers + auto_install = false, + highlight = { + enable = true, + -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules. + -- If you are experiencing weird indenting issues, add the language to + -- the list of additional_vim_regex_highlighting and disabled languages for indent. + additional_vim_regex_highlighting = { 'ruby' }, + }, + indent = { enable = true, disable = { 'ruby' } }, + } + end, -- There are additional nvim-treesitter modules that you can use to interact -- with nvim-treesitter. You should go explore a few and see what interests you: -- diff --git a/install-freebsd.sh b/install-freebsd.sh new file mode 100644 index 00000000000..d4bfcab3f77 --- /dev/null +++ b/install-freebsd.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# FreeBSD Dependencies Installation Script for kickstart.nvim +# This script installs all required dependencies for kickstart.nvim on FreeBSD + +set -e + +echo "Installing dependencies for kickstart.nvim on FreeBSD..." +echo "" + +# Check if running as root +if [ "$(id -u)" != "0" ]; then + echo "Error: This script must be run as root (use sudo)" + exit 1 +fi + +# Update package database +echo "[1/5] Updating package database..." +pkg update -f + +# Core dependencies +echo "[2/5] Installing core dependencies (git, make, unzip, clang)..." +pkg install -y base64 git gmake unzip llvm + +# Development tools +echo "[3/5] Installing development tools (ripgrep, fd)..." +pkg install -y ripgrep fd-find + +# Tree-sitter for syntax highlighting +echo "[4/5] Installing tree-sitter..." +pkg install -y tree-sitter + +# Code formatter +echo "[5/5] Installing code formatters (stylua)..." +pkg install -y stylua + +echo "" +echo "✓ All dependencies installed successfully!" +echo "" +echo "Next steps:" +echo "1. Start Neovim: nvim" +echo "2. Install plugins: :Lazy sync" +echo "3. (Optional) Set a Nerd Font in your terminal and update vim.g.have_nerd_font = true in init.lua" +echo "" From 78ad9fe4b2198feb92cfc5eb12935d751ce8d3fa Mon Sep 17 00:00:00 2001 From: berkenar1 <73941606+berkenar1@users.noreply.github.com> Date: Thu, 1 Jan 2026 18:31:33 +0300 Subject: [PATCH 2/5] Add health check, uninstall script, Makefile, and GitHub Actions workflow --- .github/workflows/freebsd-test.yml | 82 +++++++++++++++++++++++++++ Makefile | 36 ++++++++++++ check-freebsd.sh | 89 ++++++++++++++++++++++++++++++ uninstall-freebsd.sh | 63 +++++++++++++++++++++ 4 files changed, 270 insertions(+) create mode 100644 .github/workflows/freebsd-test.yml create mode 100644 Makefile create mode 100644 check-freebsd.sh create mode 100644 uninstall-freebsd.sh diff --git a/.github/workflows/freebsd-test.yml b/.github/workflows/freebsd-test.yml new file mode 100644 index 00000000000..ede9e6bcb1d --- /dev/null +++ b/.github/workflows/freebsd-test.yml @@ -0,0 +1,82 @@ +name: FreeBSD Config Test + +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] + +jobs: + test-freebsd: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Check Lua syntax + run: | + # Check if init.lua has valid Lua syntax + lua -l init.lua 2>&1 | head -20 || true + + - name: Validate shell scripts + run: | + # Validate shell scripts + sh -n install-freebsd.sh + sh -n check-freebsd.sh + sh -n uninstall-freebsd.sh + + - name: Check file structure + run: | + # Verify essential files exist + test -f README.md && echo "✓ README.md exists" + test -f init.lua && echo "✓ init.lua exists" + test -f install-freebsd.sh && echo "✓ install-freebsd.sh exists" + test -f check-freebsd.sh && echo "✓ check-freebsd.sh exists" + test -f uninstall-freebsd.sh && echo "✓ uninstall-freebsd.sh exists" + test -f Makefile && echo "✓ Makefile exists" + test -f lazy-lock.json && echo "✓ lazy-lock.json exists" + + - name: Check README format + run: | + # Verify README has essential sections + grep -q "kickstart.nvim-FreeBSD" README.md && echo "✓ README has correct title" + grep -q "FreeBSD" README.md && echo "✓ README mentions FreeBSD" + grep -q "install-freebsd.sh" README.md && echo "✓ README references install script" + + - name: Validate Makefile + run: | + # Check if Makefile syntax is valid + make -n help > /dev/null && echo "✓ Makefile is valid" + + config-validation: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Check for common config issues + run: | + # Check that treesitter config doesn't have hard-coded compiler paths + if grep -q "gcc" init.lua; then + echo "⚠ Warning: init.lua contains hardcoded 'gcc' reference" + fi + + # Check that Mason auto-install is disabled + if grep -q "lua_ls.*ensure_installed" init.lua; then + echo "✓ lua_ls auto-install is properly handled" + fi + + # Check treesitter build is disabled + if grep -q "build = false" init.lua; then + echo "✓ Treesitter build is disabled" + else + echo "⚠ Warning: Treesitter build might not be disabled" + fi + + - name: Lint shell scripts + run: | + # Simple shell script linting + for script in install-freebsd.sh check-freebsd.sh uninstall-freebsd.sh; do + echo "Checking $script..." + head -1 "$script" | grep -q "^#!/" && echo "✓ $script has shebang" + done diff --git a/Makefile b/Makefile new file mode 100644 index 00000000000..a02534a3ff2 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +.PHONY: help install check sync clean uninstall + +help: + @echo "kickstart.nvim-FreeBSD Makefile" + @echo "" + @echo "Available targets:" + @echo " make install - Install FreeBSD dependencies" + @echo " make check - Check if all dependencies are installed" + @echo " make sync - Start Neovim and sync plugins" + @echo " make clean - Clean Neovim cache and swap files" + @echo " make uninstall - Remove Neovim configuration" + @echo " make help - Show this help message" + +install: + @echo "Installing FreeBSD dependencies..." + sudo sh install-freebsd.sh + +check: + @echo "Checking dependencies..." + sh check-freebsd.sh + +sync: + @echo "Starting Neovim and syncing plugins..." + nvim +Lazy sync +q + +clean: + @echo "Cleaning Neovim cache..." + rm -rf ~/.local/share/nvim/swap + rm -rf ~/.local/state/nvim + @echo "Clean complete" + +uninstall: + @echo "Uninstalling Neovim configuration..." + sh uninstall-freebsd.sh + +.DEFAULT_GOAL := help diff --git a/check-freebsd.sh b/check-freebsd.sh new file mode 100644 index 00000000000..c9984422d18 --- /dev/null +++ b/check-freebsd.sh @@ -0,0 +1,89 @@ +#!/bin/sh +# FreeBSD Health Check Script for kickstart.nvim +# Validates that all dependencies are properly installed + +set -e + +echo "=== FreeBSD Neovim Dependencies Health Check ===" +echo "" + +# Colors +GREEN='\033[0;32m' +RED='\033[0;31m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +check_cmd() { + local cmd=$1 + local name=$2 + + if command -v "$cmd" &> /dev/null; then + echo "${GREEN}✓${NC} $name is installed" + return 0 + else + echo "${RED}✗${NC} $name is NOT installed" + return 1 + fi +} + +check_pkg() { + local pkg=$1 + local name=$2 + + if pkg info -e "$pkg" > /dev/null 2>&1; then + echo "${GREEN}✓${NC} $name is installed" + return 0 + else + echo "${RED}✗${NC} $name is NOT installed" + return 1 + fi +} + +failed=0 + +echo "Checking core tools..." +check_cmd "nvim" "Neovim" || failed=$((failed+1)) +check_cmd "git" "Git" || failed=$((failed+1)) +check_cmd "gmake" "GNU Make (gmake)" || failed=$((failed+1)) +check_cmd "unzip" "Unzip" || failed=$((failed+1)) + +echo "" +echo "Checking development tools..." +check_pkg "llvm" "LLVM/Clang" || failed=$((failed+1)) +check_cmd "rg" "Ripgrep" || failed=$((failed+1)) +check_cmd "fd" "Fd" || failed=$((failed+1)) + +echo "" +echo "Checking syntax highlighting..." +check_cmd "tree-sitter" "Tree-sitter" || failed=$((failed+1)) + +echo "" +echo "Checking formatters..." +check_cmd "stylua" "Stylua" || failed=$((failed+1)) + +echo "" +echo "Checking optional tools..." +check_cmd "base64" "Base64" || echo "${YELLOW}!${NC} Base64 (optional) not found" +check_cmd "xclip" "Xclip (clipboard)" || echo "${YELLOW}!${NC} Xclip (optional) not found" + +echo "" +echo "Checking Neovim config..." +if [ -f "$HOME/.config/nvim/init.lua" ]; then + echo "${GREEN}✓${NC} Neovim config found at ~/.config/nvim/init.lua" +else + echo "${RED}✗${NC} Neovim config NOT found" + failed=$((failed+1)) +fi + +echo "" +if [ $failed -eq 0 ]; then + echo "${GREEN}All dependencies are installed!${NC}" + echo "" + echo "You can start Neovim with: nvim" + exit 0 +else + echo "${RED}$failed dependency/dependencies are missing.${NC}" + echo "" + echo "Install missing dependencies with: sudo sh install-freebsd.sh" + exit 1 +fi diff --git a/uninstall-freebsd.sh b/uninstall-freebsd.sh new file mode 100644 index 00000000000..3be5cd993a6 --- /dev/null +++ b/uninstall-freebsd.sh @@ -0,0 +1,63 @@ +#!/bin/sh +# FreeBSD Uninstall Script for kickstart.nvim +# Cleanly removes the Neovim configuration + +set -e + +echo "=== Uninstalling kickstart.nvim-FreeBSD ===" +echo "" + +# Colors +RED='\033[0;31m' +YELLOW='\033[1;33m' +GREEN='\033[0;32m' +NC='\033[0m' # No Color + +# Confirmation +echo "${YELLOW}WARNING: This will delete your Neovim configuration!${NC}" +echo "The following will be removed:" +echo " - ~/.config/nvim" +echo " - ~/.local/share/nvim" +echo "" +read -p "Are you sure? (type 'yes' to confirm): " confirm + +if [ "$confirm" != "yes" ]; then + echo "Uninstall cancelled." + exit 0 +fi + +echo "" +echo "Uninstalling..." + +# Backup option +if [ -d "$HOME/.config/nvim" ]; then + echo "" + read -p "Create a backup before deleting? (y/n): " backup + if [ "$backup" = "y" ] || [ "$backup" = "Y" ]; then + backup_dir="$HOME/nvim-backup-$(date +%Y%m%d-%H%M%S)" + echo "Creating backup at $backup_dir..." + cp -r "$HOME/.config/nvim" "$backup_dir" + echo "${GREEN}✓ Backup created${NC}" + fi +fi + +# Remove config +echo "Removing ~/.config/nvim..." +rm -rf "$HOME/.config/nvim" + +# Remove plugin data +echo "Removing ~/.local/share/nvim..." +rm -rf "$HOME/.local/share/nvim" + +# Remove state +echo "Removing ~/.local/state/nvim..." +rm -rf "$HOME/.local/state/nvim" + +echo "" +echo "${GREEN}✓ Uninstall complete!${NC}" +echo "" +echo "To reinstall, run:" +echo " git clone https://github.com/YOUR_USERNAME/kickstart.nvim-freebsd.git ~/.config/nvim" +echo " cd ~/.config/nvim" +echo " sudo sh install-freebsd.sh" +echo " nvim +Lazy sync +q" From fcdb4c03f9656afe45363aaa21a9db342783f0b0 Mon Sep 17 00:00:00 2001 From: berkenar1 <73941606+berkenar1@users.noreply.github.com> Date: Sat, 11 Jul 2026 07:01:01 +0300 Subject: [PATCH 3/5] recent changes --- check-freebsd.sh | 0 init.lua | 8 ++++++++ install-freebsd.sh | 0 uninstall-freebsd.sh | 0 4 files changed, 8 insertions(+) mode change 100644 => 100755 check-freebsd.sh mode change 100644 => 100755 install-freebsd.sh mode change 100644 => 100755 uninstall-freebsd.sh diff --git a/check-freebsd.sh b/check-freebsd.sh old mode 100644 new mode 100755 diff --git a/init.lua b/init.lua index 99da6f9f634..83fccd9e311 100644 --- a/init.lua +++ b/init.lua @@ -158,6 +158,9 @@ vim.o.inccommand = 'split' -- Show which line your cursor is on vim.o.cursorline = true +-- Enable true color support +vim.opt.termguicolors = true + -- Minimal number of screen lines to keep above and below the cursor. vim.o.scrolloff = 10 @@ -166,6 +169,11 @@ vim.o.scrolloff = 10 -- See `:help 'confirm'` vim.o.confirm = true +vim.opt.tabstop = 4 -- Number of spaces a in the file counts for +vim.opt.softtabstop = 4 -- Number of spaces a counts for while editing +vim.opt.shiftwidth = 4 -- Number of spaces to use for each step of (auto)indent +vim.opt.expandtab = true -- Convert tabs to spaces + -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` diff --git a/install-freebsd.sh b/install-freebsd.sh old mode 100644 new mode 100755 diff --git a/uninstall-freebsd.sh b/uninstall-freebsd.sh old mode 100644 new mode 100755 From edf227aee86255467a031c71fed1d2ac13c893b7 Mon Sep 17 00:00:00 2001 From: berkenar1 <73941606+berkenar1@users.noreply.github.com> Date: Sat, 11 Jul 2026 07:10:05 +0300 Subject: [PATCH 4/5] feat: add markdown editing, preview, and math-aware writing support --- README.md | 9 ++++++++- init.lua | 22 ++++++++++++++++++++++ install-freebsd.sh | 4 ++-- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2409f3ae57b..174a0e197d2 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Or manually install dependencies: ```sh sudo pkg update -f -sudo pkg install -y git gmake unzip llvm ripgrep fd-find tree-sitter stylua base64-by-elvis +sudo pkg install -y git gmake unzip llvm ripgrep fd-find tree-sitter stylua base64-by-elvis node npm ``` **Note:** `lua-language-server` is not available in FreeBSD pkg repositories, so LSP support for Lua is disabled in this config. @@ -58,6 +58,7 @@ sudo pkg install -y git gmake unzip llvm ripgrep fd-find tree-sitter stylua base - Language Setup: - If you want to write Typescript, you need `npm` - If you want to write Golang, you will need `go` + - If you want markdown live preview, you need `node` and `npm` - etc. ### Install Kickstart.nvim-FreeBSD @@ -104,6 +105,12 @@ Wait for plugins to finish installing, then restart Neovim. Read through the `init.lua` file in your configuration folder for more information about extending and exploring Neovim. +#### Markdown Writing + +This config includes built-in support for editing and previewing technical articles: +- **Syntax & Math Highlighting**: `vim-markdown` handles syntax highlighting, frontmatter, and math support. Single `$...$` and double `$$...$$` math syntax is fully supported for highlight and structure awareness. Note that the actual math rendering happens in the browser preview. +- **Live Preview**: Toggle a live browser preview with `mp` (runs `:MarkdownPreviewToggle`). This relies on `markdown-preview.nvim` which requires `node` and `npm` installed. + ### FAQ * What should I do if I already have a pre-existing Neovim configuration? diff --git a/init.lua b/init.lua index 83fccd9e311..9e350c17818 100644 --- a/init.lua +++ b/init.lua @@ -213,6 +213,8 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the upper win -- vim.keymap.set("n", "", "J", { desc = "Move window to the lower" }) -- vim.keymap.set("n", "", "K", { desc = "Move window to the upper" }) +vim.keymap.set('n', 'mp', ':MarkdownPreviewToggle', { desc = '[M]arkdown [P]review toggle' }) + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -912,6 +914,26 @@ require('lazy').setup({ -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, + -- Markdown editing + live preview + math-aware writing + { + 'preservim/vim-markdown', + ft = { 'markdown' }, + init = function() + vim.g.vim_markdown_math = 1 + vim.g.vim_markdown_frontmatter = 1 + vim.g.vim_markdown_folding_disabled = 1 + end, + }, + + { + 'iamcco/markdown-preview.nvim', + cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' }, + ft = { 'markdown' }, + build = function() + vim.fn['mkdp#util#install']() + end, + }, + { -- Collection of various small independent plugins/modules 'echasnovski/mini.nvim', config = function() diff --git a/install-freebsd.sh b/install-freebsd.sh index d4bfcab3f77..e697c8f16c4 100755 --- a/install-freebsd.sh +++ b/install-freebsd.sh @@ -22,8 +22,8 @@ echo "[2/5] Installing core dependencies (git, make, unzip, clang)..." pkg install -y base64 git gmake unzip llvm # Development tools -echo "[3/5] Installing development tools (ripgrep, fd)..." -pkg install -y ripgrep fd-find +echo "[3/5] Installing development tools (ripgrep, fd, node, npm)..." +pkg install -y ripgrep fd-find node npm # Tree-sitter for syntax highlighting echo "[4/5] Installing tree-sitter..." From 7b95e110f14724867bd3a4068fe9f8321d6c17ac Mon Sep 17 00:00:00 2001 From: berkenar1 <73941606+berkenar1@users.noreply.github.com> Date: Sat, 11 Jul 2026 07:11:43 +0300 Subject: [PATCH 5/5] chore: track lazy-lock.json to pass CI file structure checks --- .gitignore | 1 - lazy-lock.json | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 lazy-lock.json diff --git a/.gitignore b/.gitignore index 005b535b606..8a192cab54d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ test.sh nvim spell/ -lazy-lock.json diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 00000000000..148863c8c81 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,26 @@ +{ + "LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" }, + "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, + "conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" }, + "fidget.nvim": { "branch": "main", "commit": "82404b196e73a00b1727a91903beef5ddc319d22" }, + "gitsigns.nvim": { "branch": "main", "commit": "25050e4ed39e628282831d4cbecb1850454ce915" }, + "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" }, + "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "21c5b3ebeaa0412e28096bb0701434c51c1fbf76" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, + "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" }, + "mini.nvim": { "branch": "main", "commit": "bf8169f3e518be8de3f88073ace37d91f576cb04" }, + "nvim-lspconfig": { "branch": "master", "commit": "a683e0ddf0cf64c6cd689e18ffb480ade3c162b7" }, + "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, + "nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" }, + "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "master", "commit": "9377230aa5305d9e9aca4ed8dadf1070fb4aa9fc" }, + "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, + "tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" }, + "vim-markdown": { "branch": "master", "commit": "1bc9d0cd8e1cc3e901b0a49c2b50a843f1c89397" }, + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } +}