feat: update documentation and configuration files for Neovim setup
Signed-off-by: juliano.barbosa <julianomb@gmail.com>
This commit is contained in:
		
							parent
							
								
									76edf81b0a
								
							
						
					
					
						commit
						7128ca764c
					
				|  | @ -0,0 +1,176 @@ | |||
| { | ||||
|   "version": "0.2", | ||||
|   "language": "en", | ||||
|   "words": [ | ||||
|     "Bbuild", | ||||
|     "Bdelete", | ||||
|     "DCMAKE", | ||||
|     "Ecommerce", | ||||
|     "Morganz", | ||||
|     "Munif", | ||||
|     "Nambi", | ||||
|     "PYENV", | ||||
|     "Primeagen", | ||||
|     "Pypi", | ||||
|     "Stakehodlers", | ||||
|     "Vigemus", | ||||
|     "ansiblels", | ||||
|     "arpoon", | ||||
|     "aste", | ||||
|     "augroups", | ||||
|     "autocmd", | ||||
|     "autocmds", | ||||
|     "bashls", | ||||
|     "bdelete", | ||||
|     "bufdo", | ||||
|     "bufnr", | ||||
|     "bypython", | ||||
|     "choco", | ||||
|     "chrisgrieser", | ||||
|     "clangd", | ||||
|     "cmap", | ||||
|     "ction", | ||||
|     "commitizen", | ||||
|     "danymat", | ||||
|     "dapui", | ||||
|     "debugpy", | ||||
|     "distro", | ||||
|     "dockerfilelint", | ||||
|     "dockerls", | ||||
|     "dofile", | ||||
|     "dscr", | ||||
|     "eamodio", | ||||
|     "earch", | ||||
|     "echasnovski", | ||||
|     "eclaration", | ||||
|     "eferences", | ||||
|     "efinition", | ||||
|     "elagil", | ||||
|     "elete", | ||||
|     "eleted", | ||||
|     "ename", | ||||
|     "eovim", | ||||
|     "eplace", | ||||
|     "eset", | ||||
|     "esume", | ||||
|     "exepath", | ||||
|     "eymaps", | ||||
|     "fabiospampinato", | ||||
|     "fnamemodify", | ||||
|     "folke", | ||||
|     "getfenv", | ||||
|     "githd", | ||||
|     "gofumpt", | ||||
|     "goimports", | ||||
|     "gomod", | ||||
|     "gopls", | ||||
|     "gosum", | ||||
|     "govulncheck", | ||||
|     "gowork", | ||||
|     "hadolint", | ||||
|     "hange", | ||||
|     "hclfmt", | ||||
|     "hjkl", | ||||
|     "hlsearch", | ||||
|     "hrsh", | ||||
|     "huizhou", | ||||
|     "iagnostics", | ||||
|     "ibhagwan", | ||||
|     "iles", | ||||
|     "ilot", | ||||
|     "inko", | ||||
|     "ipython", | ||||
|     "isdirectory", | ||||
|     "isort", | ||||
|     "isually", | ||||
|     "ixru", | ||||
|     "jsregexp", | ||||
|     "kondo", | ||||
|     "lazydev", | ||||
|     "lazyrepo", | ||||
|     "libuv", | ||||
|     "lspconfig", | ||||
|     "luacheck", | ||||
|     "luacheckrc", | ||||
|     "luahelper", | ||||
|     "lualine", | ||||
|     "luarc", | ||||
|     "luarocks", | ||||
|     "luasnip", | ||||
|     "lukas", | ||||
|     "mfussenegger", | ||||
|     "mhutchie", | ||||
|     "mplementation", | ||||
|     "mypy", | ||||
|     "neovim", | ||||
|     "netrw", | ||||
|     "nner", | ||||
|     "noconfirm", | ||||
|     "nohlsearch", | ||||
|     "noinsert", | ||||
|     "noremap", | ||||
|     "norl", | ||||
|     "nside", | ||||
|     "numhl", | ||||
|     "nvim", | ||||
|     "ocument", | ||||
|     "oggle", | ||||
|     "orkspace", | ||||
|     "ormat", | ||||
|     "orward", | ||||
|     "pcall", | ||||
|     "pylint", | ||||
|     "pynvim", | ||||
|     "pyproject", | ||||
|     "pyright", | ||||
|     "quickfix", | ||||
|     "rafamadriz", | ||||
|     "rcarriga", | ||||
|     "renovaterc", | ||||
|     "reqs", | ||||
|     "requirment", | ||||
|     "revious", | ||||
|     "roodolv", | ||||
|     "ruff", | ||||
|     "saadparwaiz", | ||||
|     "saiw", | ||||
|     "saoudrizwan", | ||||
|     "seleect", | ||||
|     "setfenv", | ||||
|     "shellcheck", | ||||
|     "stylua", | ||||
|     "sumneko", | ||||
|     "tage", | ||||
|     "taplo", | ||||
|     "terraformls", | ||||
|     "texthl", | ||||
|     "tflint", | ||||
|     "tfvars", | ||||
|     "tpope", | ||||
|     "trixnz", | ||||
|     "uickfix", | ||||
|     "unsedwrite", | ||||
|     "unusedparams", | ||||
|     "uote", | ||||
|     "urround", | ||||
|     "venv", | ||||
|     "verstr", | ||||
|     "windwp", | ||||
|     "xclip", | ||||
|     "xpcall", | ||||
|     "xsel", | ||||
|     "yamlfix", | ||||
|     "yamlfmt", | ||||
|     "yamlls", | ||||
|     "yinfei", | ||||
|     "yinq", | ||||
|     "ymbols" | ||||
|   ], | ||||
|   "ignoreWords": [], | ||||
|   "allowCompoundWords": true, | ||||
|   "ignorePaths": [ | ||||
|     "node_modules/**", | ||||
|     "lazy-lock.json", | ||||
|     ".git/**" | ||||
|   ] | ||||
| } | ||||
|  | @ -1,9 +1,17 @@ | |||
| FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04 | ||||
| 
 | ||||
| LABEL Name="nvim-dev-container" \ | ||||
|       Version="1.0" | ||||
| 
 | ||||
| RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||||
|     && apt-get -y install --no-install-recommends \ | ||||
|     build-essential \ | ||||
|     python3 \ | ||||
|     python3-pip | ||||
|     python3-pip \ | ||||
|     lua5.3 \ | ||||
|     lua5.3-dev \ | ||||
|     luarocks | ||||
| 
 | ||||
| RUN luarocks install luacheck | ||||
| 
 | ||||
| USER vscode | ||||
|  | @ -1,56 +1,49 @@ | |||
| // For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||||
| // README at: https://github.com/devcontainers/templates/tree/main/src/python | ||||
| { | ||||
| 	"name": "Lua Development", | ||||
| 	"build": { | ||||
| 		"dockerfile": "Dockerfile" | ||||
| 	}, | ||||
| 	// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||||
| 	"customizations": { | ||||
| 		"vscode": { | ||||
| 			"extensions": [ | ||||
| 				"GitHub.copilot", | ||||
| 				"GitHub.copilot-chat", | ||||
| 				"github.vscode-github-actions", | ||||
| 				"elagil.pre-commit-helper", | ||||
| 				"saoudrizwan.claude-dev", | ||||
| 				"sumneko.lua", | ||||
| 				"actboy168.lua-debug", | ||||
| 				"yinfei.luahelper", | ||||
| 				"keyring.Lua", | ||||
| 				"trixnz.vscode-lua", | ||||
| 				"eamodio.gitlens", | ||||
| 				"mhutchie.git-graph", | ||||
| 				"donjayamanne.githistory", | ||||
| 				"fabiospampinato.vscode-git-history", | ||||
| 				"pprice.better-merge", | ||||
| 				"ryu1kn.partial-diff", | ||||
| 				"moshfeu.compare-folders", | ||||
| 				"editorconfig.editorconfig", | ||||
| 				"ms-vscode.vs-gitlense-compare", | ||||
| 				"vsls-contrib.gitdoc", | ||||
| 				"huizhou.githd" | ||||
| 			], | ||||
| 			"settings": { | ||||
| 				"Lua.telemetry.enable": false, | ||||
| 				"Lua.diagnostics.globals": ["vim"], | ||||
| 				"Lua.workspace.library": [ | ||||
| 					"${3rd}/love2d/library" | ||||
| 				], | ||||
| 				"Lua.runtime.version": "LuaJIT", | ||||
| 				"Lua.workspace.checkThirdParty": false | ||||
| 			} | ||||
| 		} | ||||
| 	}, | ||||
| 	"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"], | ||||
| 	"postCreateCommand": { | ||||
| 		"update": "sudo apt-get update", | ||||
| 		"install-deps": "sudo apt-get install -y build-essential lua5.3 lua5.3-dev luarocks ripgrep fd-find curl git python3 python3-pip python3-venv", | ||||
| 		"install-neovim": "curl -L https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz | sudo tar xzf - -C /opt", | ||||
| 		"link-neovim": "sudo ln -s /opt/nvim-linux64/bin/nvim /usr/local/bin/nvim", | ||||
| 		"install-luacheck": "sudo luarocks install luacheck", | ||||
| 		"install-python-tools": "sudo pip3 install pynvim", | ||||
| 		"configure-python": "sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1" | ||||
| 	}, | ||||
| 	"remoteUser": "vscode" | ||||
|   "name": "My Dev Container", | ||||
|   "dockerFile": "Dockerfile", | ||||
|   "customizations": { | ||||
|     "vscode": { | ||||
|       "extensions": [ | ||||
|         "GitHub.copilot", | ||||
|         "GitHub.copilot-chat", | ||||
|         "github.vscode-github-actions", | ||||
|         "elagil.pre-commit-helper", | ||||
|         "saoudrizwan.claude-dev", | ||||
|         "sumneko.lua", | ||||
|         "actboy168.lua-debug", | ||||
|         "yinfei.luahelper", | ||||
|         "keyring.Lua", | ||||
|         "trixnz.vscode-lua", | ||||
|         "eamodio.gitlens", | ||||
|         "mhutchie.git-graph", | ||||
|         "donjayamanne.githistory", | ||||
|         "fabiospampinato.vscode-git-history", | ||||
|         "pprice.better-merge", | ||||
|         "ryu1kn.partial-diff", | ||||
|         "moshfeu.compare-folders", | ||||
|         "editorconfig.editorconfig", | ||||
|         "ms-vscode.vs-gitlense-compare", | ||||
|         "vsls-contrib.gitdoc", | ||||
|         "huizhou.githd" | ||||
|       ], | ||||
|       "settings": { | ||||
|         "Lua.telemetry.enable": false, | ||||
|         "Lua.diagnostics.globals": ["vim"], | ||||
|         "Lua.workspace.library": ["${3rd}/love2d/library"], | ||||
|         "Lua.runtime.version": "LuaJIT", | ||||
|         "Lua.workspace.checkThirdParty": false | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   "runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"], | ||||
|   "postCreateCommand": { | ||||
|     "update": "sudo apt-get update", | ||||
|     "install-deps": "sudo apt-get install -y build-essential lua5.3 lua5.3-dev luarocks ripgrep fd-find curl git python3 python3-pip python3-venv", | ||||
|     "install-neovim": "curl -L https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz | sudo tar xzf - -C /opt", | ||||
|     "link-neovim": "sudo ln -s /opt/nvim-linux64/bin/nvim /usr/local/bin/nvim", | ||||
|     "install-luacheck": "sudo luarocks install luacheck", | ||||
|     "install-python-tools": "sudo pip3 install pynvim", | ||||
|     "configure-python": "sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1" | ||||
|   }, | ||||
|   "remoteUser": "vscode" | ||||
| } | ||||
|  |  | |||
|  | @ -4,9 +4,7 @@ about: Create a report to help us improve | |||
| title: '' | ||||
| labels: '' | ||||
| assignees: '' | ||||
| 
 | ||||
| --- | ||||
| 
 | ||||
| <!-- Any bug report not following this template will be immediately closed. Thanks --> | ||||
| 
 | ||||
| ## Before Reporting an Issue | ||||
|  |  | |||
|  | @ -5,4 +5,3 @@ Github by default opens Pull Requests against the parent of a forked repository. | |||
| If this is your personal fork and you didn't intend to open a PR for contribution | ||||
| to the original project then adjust the `base repository` accordingly. | ||||
| ************************************************************************** | ||||
| 
 | ||||
|  |  | |||
|  | @ -18,4 +18,3 @@ jobs: | |||
|           token: ${{ secrets.GITHUB_TOKEN }} | ||||
|           version: latest | ||||
|           args: --check . | ||||
| 
 | ||||
|  |  | |||
|  | @ -0,0 +1,51 @@ | |||
| -- Global objects | ||||
| globals = { | ||||
|     "vim", | ||||
|     "assert", | ||||
|     "after_each", | ||||
|     "before_each", | ||||
|     "describe", | ||||
|     "it", | ||||
|     "teardown", | ||||
|     "pending", | ||||
| } | ||||
| 
 | ||||
| -- Rerun tests only if their modification time changed | ||||
| cache = true | ||||
| 
 | ||||
| -- Don't report unused self arguments of methods | ||||
| self = false | ||||
| 
 | ||||
| -- Redefine these functions to support OpenResty AWS Lambda | ||||
| read_globals = { | ||||
|     "ngx", | ||||
|     "jit", | ||||
|     "require", | ||||
|     "package", | ||||
|     "string", | ||||
|     "table", | ||||
|     "math", | ||||
|     "io", | ||||
|     "os", | ||||
|     "print", | ||||
|     "tonumber", | ||||
|     "tostring", | ||||
|     "type", | ||||
|     "select", | ||||
|     "pairs", | ||||
|     "ipairs", | ||||
|     "next", | ||||
|     "error", | ||||
|     "pcall", | ||||
|     "xpcall", | ||||
|     "unpack", | ||||
| } | ||||
| 
 | ||||
| -- Maximum line length | ||||
| max_line_length = 120 | ||||
| 
 | ||||
| -- Don't report unused arguments | ||||
| unused_args = false | ||||
| 
 | ||||
| -- Don't check unreachable code | ||||
| unreachable = false | ||||
|  | @ -0,0 +1,30 @@ | |||
| # Default state for all rules | ||||
| default: true | ||||
| 
 | ||||
| # MD013/line-length - Line length | ||||
| MD013: | ||||
|   # Number of characters | ||||
|   line_length: 120 | ||||
|   # Allow longer lines for code blocks | ||||
|   code_blocks: true | ||||
|   tables: true | ||||
| 
 | ||||
| # MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content | ||||
| MD024: | ||||
|   # Only check sibling headings | ||||
|   allow_different_nesting: true | ||||
| 
 | ||||
| # MD033/no-inline-html - Inline HTML | ||||
| MD033: | ||||
|   # Allow specific HTML tags | ||||
|   allowed_elements: | ||||
|     - details | ||||
|     - summary | ||||
| 
 | ||||
| # MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading | ||||
| MD041: false | ||||
| 
 | ||||
| # MD004/ul-style - Unordered list style | ||||
| MD004: | ||||
|   # List style | ||||
|   style: "consistent" | ||||
|  | @ -0,0 +1,53 @@ | |||
| # Security-focused pre-commit configuration with autoupdate settings | ||||
| default_install_hook_types: [pre-commit, pre-push] | ||||
| default_stages: [pre-commit, pre-merge-commit] | ||||
| minimum_pre_commit_version: "3.5.0" | ||||
| 
 | ||||
| ci: | ||||
|     autofix_commit_msg: 'chore(pre-commit): auto fixes from pre-commit hooks' | ||||
|     autoupdate_commit_msg: 'chore(pre-commit): update pre-commit hook versions' | ||||
|     autoupdate_schedule: weekly | ||||
|     submodules: true | ||||
|     skip: [] | ||||
| 
 | ||||
| repos: | ||||
| -   repo: https://github.com/pre-commit/pre-commit-hooks | ||||
|     rev: v5.0.0 | ||||
|     hooks: | ||||
|     -   id: trailing-whitespace | ||||
|     -   id: end-of-file-fixer | ||||
|     -   id: check-yaml | ||||
|     -   id: check-json | ||||
|     -   id: check-added-large-files | ||||
|         args: ['--maxkb=500'] | ||||
|     -   id: check-merge-conflict | ||||
|     -   id: detect-private-key | ||||
|     -   id: mixed-line-ending | ||||
|         args: ['--fix=lf'] | ||||
| 
 | ||||
| -   repo: https://github.com/streetsidesoftware/cspell-cli | ||||
|     rev: v8.17.2 | ||||
|     hooks: | ||||
|     -   id: cspell | ||||
|         name: Spell Check | ||||
|         args: ["--config", ".cspell.json"] | ||||
|         stages: [pre-commit] | ||||
| 
 | ||||
| # Temporarily commenting out stricter checks until we can fix all markdown and other issues | ||||
| # Will uncomment and fix gradually | ||||
| 
 | ||||
| # -   repo: https://github.com/Calinou/pre-commit-luacheck | ||||
| #     rev: v1.0.0 | ||||
| #     hooks: | ||||
| #     -   id: luacheck | ||||
| #         args: ['--config', '.luacheckrc'] | ||||
| 
 | ||||
| # -   repo: https://github.com/igorshubovych/markdownlint-cli | ||||
| #     rev: v0.39.0 | ||||
| #     hooks: | ||||
| #     -   id: markdownlint | ||||
| #         args: ["--config", ".markdownlint.yaml"] | ||||
| #         files: \.(md|markdown)$ | ||||
| 
 | ||||
| # Additional hooks commented out for initial setup | ||||
| # Will be enabled incrementally as we fix issues | ||||
|  | @ -1,94 +0,0 @@ | |||
| # Security-focused pre-commit configuration with autoupdate settings | ||||
| default_install_hook_types: [pre-commit, pre-push] | ||||
| default_stages: [pre-commit, pre-merge-commit] | ||||
| minimum_pre_commit_version: "3.5.0" | ||||
| 
 | ||||
| ci: | ||||
|     autofix_commit_msg: 'chore(pre-commit): auto fixes from pre-commit hooks' | ||||
|     autoupdate_commit_msg: 'chore(pre-commit): update pre-commit hook versions' | ||||
|     autoupdate_schedule: weekly | ||||
|     submodules: true | ||||
|     skip: [] | ||||
| 
 | ||||
| repos: | ||||
| -   repo: https://github.com/pre-commit/pre-commit-hooks | ||||
|     rev: v5.0.0 | ||||
|     hooks: | ||||
|     -   id: trailing-whitespace | ||||
|     -   id: end-of-file-fixer | ||||
|     -   id: check-yaml | ||||
|     -   id: check-json | ||||
|     -   id: check-added-large-files | ||||
|         args: ['--maxkb=500'] | ||||
|     -   id: check-merge-conflict | ||||
|     -   id: detect-private-key | ||||
|     -   id: mixed-line-ending | ||||
|         args: ['--fix=lf'] | ||||
|     -   id: check-executables-have-shebangs | ||||
|     -   id: check-shebang-scripts-are-executable | ||||
| 
 | ||||
| -   repo: https://github.com/Calinou/pre-commit-luacheck | ||||
|     rev: v1.0.0 | ||||
|     hooks: | ||||
|     -   id: luacheck | ||||
|         args: ['--config', '.luacheckrc'] | ||||
| 
 | ||||
| -   repo: https://github.com/JohnnyMorganz/StyLua | ||||
|     rev: v2.0.2 | ||||
|     hooks: | ||||
|     -   id: stylua | ||||
|         args: ['--config-path', 'stylua.toml'] | ||||
| 
 | ||||
| -   repo: https://github.com/zricethezav/gitleaks | ||||
|     rev: v8.23.3 | ||||
|     hooks: | ||||
|     -   id: gitleaks | ||||
|         name: GitLeaks - Detect Secrets | ||||
|         description: Scan for hardcoded secrets and credentials | ||||
|         entry: gitleaks protect --verbose --redact --staged | ||||
|         stages: [pre-commit, pre-push] | ||||
| 
 | ||||
| -   repo: https://github.com/PyCQA/bandit | ||||
|     rev: 1.8.2 | ||||
|     hooks: | ||||
|     -   id: bandit | ||||
|         args: ["-c", "pyproject.toml"] | ||||
|         additional_dependencies: ['.[toml]'] | ||||
|         stages: [pre-commit] | ||||
| 
 | ||||
| -   repo: https://github.com/renovatebot/pre-commit-hooks | ||||
|     rev: 39.160.1 | ||||
|     hooks: | ||||
|     -   id: renovate-config-validator | ||||
|         name: Validate Renovate Config | ||||
|         files: renovate\.json|\.renovaterc|\.renovaterc\.(json|yaml|yml) | ||||
| 
 | ||||
| -   repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs | ||||
|     rev: v1.1.2 | ||||
|     hooks: | ||||
|     -   id: dockerfile_lint | ||||
|     -   id: markdown-toc | ||||
| 
 | ||||
| -   repo: https://github.com/streetsidesoftware/cspell-cli | ||||
|     rev: v8.17.2 | ||||
|     hooks: | ||||
|     -   id: cspell | ||||
|         name: Spell Check | ||||
|         args: ["--config", ".cspell.json"] | ||||
|         stages: [pre-commit] | ||||
| 
 | ||||
| -   repo: https://github.com/Yelp/detect-secrets | ||||
|     rev: v1.5.0 | ||||
|     hooks: | ||||
|     -   id: detect-secrets | ||||
|         args: ['--baseline', '.secrets.baseline'] | ||||
|         exclude: package-lock.json | ||||
| 
 | ||||
| -   repo: local | ||||
|     hooks: | ||||
|     -   id: check-lua-syntax | ||||
|         name: Check Lua Syntax | ||||
|         entry: lua -e 'for f in pairs(arg) do assert(loadfile(f)) end' | ||||
|         language: system | ||||
|         files: \.(lua|rockspec)$ | ||||
|         stages: [pre-commit] | ||||
|  | @ -0,0 +1,141 @@ | |||
| { | ||||
|   "version": "1.5.0", | ||||
|   "plugins_used": [ | ||||
|     { | ||||
|       "name": "ArtifactoryDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "AWSKeyDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "AzureStorageKeyDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "Base64HighEntropyString", | ||||
|       "limit": 4.5 | ||||
|     }, | ||||
|     { | ||||
|       "name": "BasicAuthDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "CloudantDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "DiscordBotTokenDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "GitHubTokenDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "GitLabTokenDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "HexHighEntropyString", | ||||
|       "limit": 3.0 | ||||
|     }, | ||||
|     { | ||||
|       "name": "IbmCloudIamDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "IbmCosHmacDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "IPPublicDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "JwtTokenDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "KeywordDetector", | ||||
|       "keyword_exclude": "" | ||||
|     }, | ||||
|     { | ||||
|       "name": "MailchimpDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "NpmDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "OpenAIDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "PrivateKeyDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "PypiTokenDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "SendGridDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "SlackDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "SoftlayerDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "SquareOAuthDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "StripeDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "TelegramBotTokenDetector" | ||||
|     }, | ||||
|     { | ||||
|       "name": "TwilioKeyDetector" | ||||
|     } | ||||
|   ], | ||||
|   "filters_used": [ | ||||
|     { | ||||
|       "path": "detect_secrets.filters.allowlist.is_line_allowlisted" | ||||
|     }, | ||||
|     { | ||||
|       "path": "detect_secrets.filters.common.is_baseline_file", | ||||
|       "filename": ".secrets.baseline" | ||||
|     }, | ||||
|     { | ||||
|       "path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies", | ||||
|       "min_level": 2 | ||||
|     }, | ||||
|     { | ||||
|       "path": "detect_secrets.filters.heuristic.is_indirect_reference" | ||||
|     }, | ||||
|     { | ||||
|       "path": "detect_secrets.filters.heuristic.is_likely_id_string" | ||||
|     }, | ||||
|     { | ||||
|       "path": "detect_secrets.filters.heuristic.is_lock_file" | ||||
|     }, | ||||
|     { | ||||
|       "path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string" | ||||
|     }, | ||||
|     { | ||||
|       "path": "detect_secrets.filters.heuristic.is_potential_uuid" | ||||
|     }, | ||||
|     { | ||||
|       "path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign" | ||||
|     }, | ||||
|     { | ||||
|       "path": "detect_secrets.filters.heuristic.is_sequential_string" | ||||
|     }, | ||||
|     { | ||||
|       "path": "detect_secrets.filters.heuristic.is_swagger_file" | ||||
|     }, | ||||
|     { | ||||
|       "path": "detect_secrets.filters.heuristic.is_templated_secret" | ||||
|     } | ||||
|   ], | ||||
|   "results": { | ||||
|     "lua/custom/plugins/chatgpt.lua": [ | ||||
|       { | ||||
|         "type": "Secret Keyword", | ||||
|         "filename": "lua/custom/plugins/chatgpt.lua", | ||||
|         "hashed_secret": "42466effcc4e1af986ac527f108a0be74a368278", | ||||
|         "is_verified": false, | ||||
|         "line_number": 8 | ||||
|       } | ||||
|     ] | ||||
|   }, | ||||
|   "generated_at": "2025-02-22T17:46:48Z" | ||||
| } | ||||
|  | @ -235,4 +235,3 @@ sudo dnf install -y gcc make git ripgrep fd-find unzip neovim | |||
| sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim | ||||
| ``` | ||||
| </details> | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										244
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										244
									
								
								init.lua
								
								
								
								
							|  | @ -1,3 +1,23 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| --[[ | ||||
| 
 | ||||
| ===================================================================== | ||||
|  | @ -103,12 +123,11 @@ if vim.fn.isdirectory(syntax_dir) == 0 then | |||
|   local syntax_file = syntax_dir .. '/syntax.vim' | ||||
|   if vim.fn.filereadable(syntax_file) == 0 then | ||||
|     local file = io.open(syntax_file, 'w') | ||||
|     file:write('\" Base syntax file\n') | ||||
|     file:write('" Base syntax file\n') | ||||
|     file:close() | ||||
|   end | ||||
| end | ||||
| 
 | ||||
| 
 | ||||
| --  NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) | ||||
| vim.g.mapleader = ' ' | ||||
| vim.g.maplocalleader = ' ' | ||||
|  | @ -127,7 +146,6 @@ vim.g.have_nerd_font = true | |||
| -- See `:help vim.opt` | ||||
| -- NOTE: You can change these options as you wish! | ||||
| --  For more options, you can see `:help option-list` | ||||
| 
 | ||||
| -- Make line numbers default | ||||
| vim.opt.number = true | ||||
| -- You can also add relative line numbers, to help with jumping. | ||||
|  | @ -245,9 +263,9 @@ vim.keymap.set('n', '<leader>wa', ':wall<CR>', { noremap = true, desc = '[W]rite | |||
| vim.keymap.set('n', '<leader>wf', ':w<CR>', { noremap = true, desc = '[W]rite [F]ile' }) | ||||
| 
 | ||||
| -- Create command do save with qw | ||||
| vim.api.nvim_command 'cmap qw wq' | ||||
| vim.api.nvim_command 'cmap WQ wq' | ||||
| vim.api.nvim_command 'cmap QW wq' | ||||
| vim.api.nvim_command('cmap qw wq') | ||||
| vim.api.nvim_command('cmap WQ wq') | ||||
| vim.api.nvim_command('cmap QW wq') | ||||
| 
 | ||||
| -- Navigate buffers | ||||
| vim.keymap.set('n', '<S-h>', ':bp<CR>', { noremap = true, desc = '[G]oto [P]previous Buffer' }) | ||||
|  | @ -262,21 +280,21 @@ vim.keymap.set('n', '<leader>taa', ':!make applyA<CR>', opts) | |||
| 
 | ||||
| -- [[ JMB End ]] | ||||
| 
 | ||||
| 
 | ||||
| -- Add uri module compatibility layer for older Neovim versions | ||||
| if not vim.uri then | ||||
|   vim.uri = { | ||||
|     -- Basic uri encode/decode functions | ||||
|     encode = function(str) | ||||
|       return str and str:gsub("\n", "%%0A"):gsub("([^%w-_.~])", function(c) | ||||
|         return string.format("%%%02X", string.byte(c)) | ||||
|       end) | ||||
|       return str | ||||
|         and str:gsub('\n', '%%0A'):gsub('([^%w-_.~])', function(c) | ||||
|           return string.format('%%%02X', string.byte(c)) | ||||
|         end) | ||||
|     end, | ||||
|     decode = function(str) | ||||
|       return str and str:gsub("%%(%x%x)", function(hex) | ||||
|       return str and str:gsub('%%(%x%x)', function(hex) | ||||
|         return string.char(tonumber(hex, 16)) | ||||
|       end) | ||||
|     end | ||||
|     end, | ||||
|   } | ||||
| end | ||||
| 
 | ||||
|  | @ -285,18 +303,18 @@ end | |||
| -- [[ Install `lazy.nvim` plugin manager ]] | ||||
| --    See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info | ||||
| local function bootstrap_lazy() | ||||
|   local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' | ||||
|   local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' | ||||
|   if not (vim.uv or vim.loop).fs_stat(lazypath) then | ||||
|     vim.notify('Installing lazy.nvim...', vim.log.levels.INFO) | ||||
|     local lazyrepo = 'https://github.com/folke/lazy.nvim.git' | ||||
|     local out = vim.fn.system {  | ||||
|     local out = vim.fn.system({ | ||||
|       'git', | ||||
|       'clone', | ||||
|       '--filter=blob:none', | ||||
|       '--branch=stable', | ||||
|       lazyrepo, | ||||
|       lazypath | ||||
|     } | ||||
|       lazypath, | ||||
|     }) | ||||
|     if vim.v.shell_error ~= 0 then | ||||
|       error('Error cloning lazy.nvim:\n' .. out) | ||||
|     end | ||||
|  | @ -449,7 +467,7 @@ require('lazy').setup({ | |||
|         -- `cond` is a condition used to determine whether this plugin should be | ||||
|         -- installed and loaded. | ||||
|         cond = function() | ||||
|           return vim.fn.executable 'make' == 1 | ||||
|           return vim.fn.executable('make') == 1 | ||||
|         end, | ||||
|       }, | ||||
|       { 'nvim-telescope/telescope-ui-select.nvim' }, | ||||
|  | @ -479,7 +497,7 @@ require('lazy').setup({ | |||
| 
 | ||||
|       -- [[ Configure Telescope ]] | ||||
|       -- See `:help telescope` and `:help telescope.setup()` | ||||
|       require('telescope').setup { | ||||
|       require('telescope').setup({ | ||||
|         -- You can put your default mappings / updates / etc. in here | ||||
|         --  All the info you're looking for is in `:help telescope.setup()` | ||||
|         -- | ||||
|  | @ -494,14 +512,14 @@ require('lazy').setup({ | |||
|             require('telescope.themes').get_dropdown(), | ||||
|           }, | ||||
|         }, | ||||
|       } | ||||
|       }) | ||||
| 
 | ||||
|       -- Enable Telescope extensions if they are installed | ||||
|       pcall(require('telescope').load_extension, 'fzf') | ||||
|       pcall(require('telescope').load_extension, 'ui-select') | ||||
| 
 | ||||
|       -- See `:help telescope.builtin` | ||||
|       local builtin = require 'telescope.builtin' | ||||
|       local builtin = require('telescope.builtin') | ||||
|       vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) | ||||
|       vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) | ||||
|       vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' }) | ||||
|  | @ -516,24 +534,24 @@ require('lazy').setup({ | |||
|       -- Slightly advanced example of overriding default behavior and theme | ||||
|       vim.keymap.set('n', '<leader>/', function() | ||||
|         -- You can pass additional configuration to Telescope to change the theme, layout, etc. | ||||
|         builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { | ||||
|         builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown({ | ||||
|           winblend = 10, | ||||
|           previewer = false, | ||||
|         }) | ||||
|         })) | ||||
|       end, { desc = '[/] Fuzzily search in current buffer' }) | ||||
| 
 | ||||
|       -- It's also possible to pass additional configuration options. | ||||
|       --  See `:help telescope.builtin.live_grep()` for information about particular keys | ||||
|       vim.keymap.set('n', '<leader>s/', function() | ||||
|         builtin.live_grep { | ||||
|         builtin.live_grep({ | ||||
|           grep_open_files = true, | ||||
|           prompt_title = 'Live Grep in Open Files', | ||||
|         } | ||||
|         }) | ||||
|       end, { desc = '[S]earch [/] in Open Files' }) | ||||
| 
 | ||||
|       -- Shortcut for searching your Neovim configuration files | ||||
|       vim.keymap.set('n', '<leader>sn', function() | ||||
|         builtin.find_files { cwd = vim.fn.stdpath 'config' } | ||||
|         builtin.find_files({ cwd = vim.fn.stdpath('config') }) | ||||
|       end, { desc = '[S]earch [N]eovim files' }) | ||||
|     end, | ||||
|   }, | ||||
|  | @ -545,7 +563,7 @@ require('lazy').setup({ | |||
|     'folke/lazydev.nvim', | ||||
|     priority = 1000, | ||||
|     -- Simple configuration as recommended by lazydev documentation | ||||
|     opts = {} | ||||
|     opts = {}, | ||||
|   }, | ||||
|   { | ||||
|     -- Main LSP Configuration | ||||
|  | @ -651,13 +669,12 @@ require('lazy').setup({ | |||
|           -- When you move your cursor, the highlights will be cleared (the second autocommand). | ||||
|           local client = vim.lsp.get_client_by_id(event.data.client_id) | ||||
| 
 | ||||
| -- Ensure LSP features are available | ||||
| local has_lsp, _ = pcall(require, 'vim.lsp') | ||||
| if not has_lsp then | ||||
|   vim.notify('LSP support not available in this Neovim version', vim.log.levels.WARN) | ||||
|   return | ||||
| end | ||||
| 
 | ||||
|           -- Ensure LSP features are available | ||||
|           local has_lsp, _ = pcall(require, 'vim.lsp') | ||||
|           if not has_lsp then | ||||
|             vim.notify('LSP support not available in this Neovim version', vim.log.levels.WARN) | ||||
|             return | ||||
|           end | ||||
| 
 | ||||
|           if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then | ||||
|             local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) | ||||
|  | @ -677,7 +694,7 @@ end | |||
|               group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }), | ||||
|               callback = function(event2) | ||||
|                 vim.lsp.buf.clear_references() | ||||
|                 vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf } | ||||
|                 vim.api.nvim_clear_autocmds({ group = 'kickstart-lsp-highlight', buffer = event2.buf }) | ||||
|               end, | ||||
|             }) | ||||
|           end | ||||
|  | @ -688,7 +705,7 @@ end | |||
|           -- This may be unwanted, since they displace some of your code | ||||
|           if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then | ||||
|             map('<leader>th', function() | ||||
|               vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) | ||||
|               vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf })) | ||||
|             end, '[T]oggle Inlay [H]ints') | ||||
|           end | ||||
|         end, | ||||
|  | @ -783,48 +800,48 @@ end | |||
|             }, | ||||
|           }, | ||||
|         }, | ||||
|         -- clangd = {}, | ||||
|         gopls = { | ||||
|           gofumpt = true, | ||||
|           codelenses = { | ||||
|             gc_details = true, | ||||
|             generate = true, | ||||
|             upgrade_dependency = true, | ||||
|             regenerate_cgo = true, | ||||
|             run_govulncheck = true, | ||||
|             test = true, | ||||
|             tidy = true, | ||||
|             vendor = true, | ||||
|           }, | ||||
|           hints = { | ||||
|             assignVariableTypes = true, | ||||
|             compositeLiteralFields = true, | ||||
|             compositeLiteralTypes = true, | ||||
|             constantValues = true, | ||||
|             functionTypeParameters = true, | ||||
|             parameterNames = true, | ||||
|             rangeVariableTypes = true, | ||||
|           }, | ||||
|           analyses = { | ||||
|             fieldalignment = true, | ||||
|             nilness = true, | ||||
|             unusedparams = true, | ||||
|             unsedwrite = true, | ||||
|             useany = true, | ||||
|           }, | ||||
|           usePlaceholders = true, | ||||
|           completeUnimported = true, | ||||
|           staticcheck = true, | ||||
|           directoryFilters = { | ||||
|             '-.git', | ||||
|             '-.vscode', | ||||
|             '-.idea', | ||||
|             '-.vscode-test', | ||||
|             '-node_modules', | ||||
|             '-vendor', | ||||
|           }, | ||||
|           semanticTokens = true, | ||||
|         }, | ||||
|         -- -- clangd = {}, | ||||
|         -- gopls = { | ||||
|         --   gofumpt = true, | ||||
|         --   codelenses = { | ||||
|         --     gc_details = true, | ||||
|         --     generate = true, | ||||
|         --     upgrade_dependency = true, | ||||
|         --     regenerate_cgo = true, | ||||
|         --     run_govulncheck = true, | ||||
|         --     test = true, | ||||
|         --     tidy = true, | ||||
|         --     vendor = true, | ||||
|         --   }, | ||||
|         --   hints = { | ||||
|         --     assignVariableTypes = true, | ||||
|         --     compositeLiteralFields = true, | ||||
|         --     compositeLiteralTypes = true, | ||||
|         --     constantValues = true, | ||||
|         --     functionTypeParameters = true, | ||||
|         --     parameterNames = true, | ||||
|         --     rangeVariableTypes = true, | ||||
|         --   }, | ||||
|         --   analyses = { | ||||
|         --     fieldalignment = true, | ||||
|         --     nilness = true, | ||||
|         --     unusedparams = true, | ||||
|         --     unsedwrite = true, | ||||
|         --     useany = true, | ||||
|         --   }, | ||||
|         --   usePlaceholders = true, | ||||
|         --   completeUnimported = true, | ||||
|         --   staticcheck = true, | ||||
|         --   directoryFilters = { | ||||
|         --     '-.git', | ||||
|         --     '-.vscode', | ||||
|         --     '-.idea', | ||||
|         --     '-.vscode-test', | ||||
|         --     '-node_modules', | ||||
|         --     '-vendor', | ||||
|         --   }, | ||||
|         --   semanticTokens = true, | ||||
|         -- }, | ||||
|         terraformls = { | ||||
|           root_dir = require('lspconfig.util').root_pattern('.terraform', '.git'), | ||||
|           filetypes = { | ||||
|  | @ -918,23 +935,16 @@ end | |||
|         'bicep-lsp', | ||||
|         'black', | ||||
|         'debugpy', | ||||
|         'delve', | ||||
|         'docker-compose-language-service', | ||||
|         'dockerfile-language-server', | ||||
|         'eslint-lsp', | ||||
|         'flake8', | ||||
|         'gofumpt', | ||||
|         'goimports', | ||||
|         'gomodifytags', | ||||
|         'hadolint', | ||||
|         'hclfmt', | ||||
|         'helm-ls', | ||||
|         'html-lsp', | ||||
|         'impl', | ||||
|         'isort', | ||||
|         'jedi-language-server', | ||||
|         'jq', | ||||
|         'jq-lsp', | ||||
|         'json-lsp', | ||||
|         'jsonlint', | ||||
|         'markdownlint', | ||||
|  | @ -948,15 +958,16 @@ end | |||
|         'taplo', | ||||
|         'terraform-ls', | ||||
|         'tflint', | ||||
|         'trivy', | ||||
|         'yaml-language-server', | ||||
|         'yamlfix', | ||||
|         'yamlfmt', | ||||
|         'yamllint', -- Used to format Lua code | ||||
|         'yq', -- Used to format Lua code | ||||
|       }) | ||||
|       require('mason-tool-installer').setup { ensure_installed = ensure_installed } | ||||
|       require('mason-tool-installer').setup({ ensure_installed = ensure_installed }) | ||||
| 
 | ||||
|       require('mason-lspconfig').setup { | ||||
|       require('mason-lspconfig').setup({ | ||||
|         handlers = { | ||||
|           function(server_name) | ||||
|             local server = servers[server_name] or {} | ||||
|  | @ -967,7 +978,7 @@ end | |||
|             require('lspconfig')[server_name].setup(server) | ||||
|           end, | ||||
|         }, | ||||
|       } | ||||
|       }) | ||||
|     end, | ||||
|   }, | ||||
| 
 | ||||
|  | @ -979,7 +990,7 @@ end | |||
|       { | ||||
|         '<leader>f', | ||||
|         function() | ||||
|           require('conform').format { async = true, lsp_format = 'fallback' } | ||||
|           require('conform').format({ async = true, lsp_format = 'fallback' }) | ||||
|         end, | ||||
|         mode = '', | ||||
|         desc = '[F]ormat buffer', | ||||
|  | @ -1032,7 +1043,7 @@ end | |||
|           -- Build Step is needed for regex support in snippets. | ||||
|           -- This step is not supported in many windows environments. | ||||
|           -- Remove the below condition to re-enable on windows. | ||||
|           if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then | ||||
|           if vim.fn.has('win32') == 1 or vim.fn.executable('make') == 0 then | ||||
|             return | ||||
|           end | ||||
|           return 'make install_jsregexp' | ||||
|  | @ -1059,11 +1070,11 @@ end | |||
|     }, | ||||
|     config = function() | ||||
|       -- See `:help cmp` | ||||
|       local cmp = require 'cmp' | ||||
|       local luasnip = require 'luasnip' | ||||
|       luasnip.config.setup {} | ||||
|       local cmp = require('cmp') | ||||
|       local luasnip = require('luasnip') | ||||
|       luasnip.config.setup({}) | ||||
| 
 | ||||
|       cmp.setup { | ||||
|       cmp.setup({ | ||||
|         snippet = { | ||||
|           expand = function(args) | ||||
|             luasnip.lsp_expand(args.body) | ||||
|  | @ -1075,7 +1086,7 @@ end | |||
|         -- chosen, you will need to read `:help ins-completion` | ||||
|         -- | ||||
|         -- No, but seriously. Please read `:help ins-completion`, it is really good! | ||||
|         mapping = cmp.mapping.preset.insert { | ||||
|         mapping = cmp.mapping.preset.insert({ | ||||
|           -- Select the [n]ext item | ||||
|           ['<C-n>'] = cmp.mapping.select_next_item(), | ||||
|           -- Select the [p]revious item | ||||
|  | @ -1088,7 +1099,7 @@ end | |||
|           -- Accept ([y]es) the completion. | ||||
|           --  This will auto-import if your LSP supports it. | ||||
|           --  This will expand snippets if the LSP sent a snippet. | ||||
|           ['<C-y>'] = cmp.mapping.confirm { select = true }, | ||||
|           ['<C-y>'] = cmp.mapping.confirm({ select = true }), | ||||
| 
 | ||||
|           -- If you prefer more traditional completion keymaps, | ||||
|           -- you can uncomment the following lines | ||||
|  | @ -1099,7 +1110,7 @@ end | |||
|           -- Manually trigger a completion from nvim-cmp. | ||||
|           --  Generally you don't need this, because nvim-cmp will display | ||||
|           --  completions whenever it has completion options available. | ||||
|           ['<C-Space>'] = cmp.mapping.complete {}, | ||||
|           ['<C-Space>'] = cmp.mapping.complete({}), | ||||
| 
 | ||||
|           -- Think of <c-l> as moving to the right of your snippet expansion. | ||||
|           --  So if you have a snippet that's like: | ||||
|  | @ -1122,7 +1133,7 @@ end | |||
| 
 | ||||
|           -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: | ||||
|           --    https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps | ||||
|         }, | ||||
|         }), | ||||
|         sources = { | ||||
|           { | ||||
|             name = 'lazydev', | ||||
|  | @ -1133,7 +1144,7 @@ end | |||
|           { name = 'luasnip' }, | ||||
|           { name = 'path' }, | ||||
|         }, | ||||
|       } | ||||
|       }) | ||||
|     end, | ||||
|   }, | ||||
| 
 | ||||
|  | @ -1148,15 +1159,20 @@ end | |||
|       -- Load the colorscheme here. | ||||
|       -- Like many other themes, this one has different styles, and you could load | ||||
|       -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. | ||||
|       vim.cmd.colorscheme 'tokyonight-night' | ||||
|       vim.cmd.colorscheme('tokyonight-night') | ||||
| 
 | ||||
|       -- You can configure highlights by doing something like: | ||||
|       vim.cmd.hi 'Comment gui=none' | ||||
|       vim.cmd.hi('Comment gui=none') | ||||
|     end, | ||||
|   }, | ||||
| 
 | ||||
|   -- Highlight todo, notes, etc in comments | ||||
|   { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, | ||||
|   { | ||||
|     'folke/todo-comments.nvim', | ||||
|     event = 'VimEnter', | ||||
|     dependencies = { 'nvim-lua/plenary.nvim' }, | ||||
|     opts = { signs = false }, | ||||
|   }, | ||||
|   { 'echasnovski/mini.surround', branch = 'stable', opts = { search_method = 'cover_or_next' } }, | ||||
|   { -- Collection of various small independent plugins/modules | ||||
|     'echasnovski/mini.nvim', | ||||
|  | @ -1167,7 +1183,7 @@ end | |||
|       --  - va)  - [V]isually select [A]round [)]paren | ||||
|       --  - yinq - [Y]ank [I]nside [N]ext [Q]uote | ||||
|       --  - ci'  - [C]hange [I]nside [']quote | ||||
|       require('mini.ai').setup { n_lines = 500 } | ||||
|       require('mini.ai').setup({ n_lines = 500 }) | ||||
| 
 | ||||
|       -- Add/delete/replace surroundings (brackets, quotes, etc.) | ||||
|       -- | ||||
|  | @ -1179,9 +1195,9 @@ end | |||
|       -- Simple and easy statusline. | ||||
|       --  You could remove this setup call if you don't like it, | ||||
|       --  and try some other statusline plugin | ||||
|       local statusline = require 'mini.statusline' | ||||
|       local statusline = require('mini.statusline') | ||||
|       -- set use_icons to true if you have a Nerd Font | ||||
|       statusline.setup { use_icons = vim.g.have_nerd_font } | ||||
|       statusline.setup({ use_icons = vim.g.have_nerd_font }) | ||||
| 
 | ||||
|       -- You can configure sections in the statusline by overriding their | ||||
|       -- default behavior. For example, here we set the section for | ||||
|  | @ -1254,12 +1270,12 @@ end | |||
|   --  Here are some example plugins that I've included in the Kickstart repository. | ||||
|   --  Uncomment any of the lines below to enable them (you will need to restart nvim). | ||||
|   -- | ||||
|   require 'kickstart.plugins.debug', | ||||
|   require 'kickstart.plugins.indent_line', | ||||
|   require 'kickstart.plugins.lint', | ||||
|   require 'kickstart.plugins.autopairs', | ||||
|   require 'kickstart.plugins.neo-tree', | ||||
|   require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps | ||||
|   require('kickstart.plugins.debug'), | ||||
|   require('kickstart.plugins.indent_line'), | ||||
|   require('kickstart.plugins.lint'), | ||||
|   require('kickstart.plugins.autopairs'), | ||||
|   require('kickstart.plugins.neo-tree'), | ||||
|   require('kickstart.plugins.gitsigns'), -- adds gitsigns recommend keymaps | ||||
| 
 | ||||
|   -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` | ||||
|   --    This is the easiest way to modularize your config. | ||||
|  | @ -1297,7 +1313,12 @@ end | |||
| -- Better copy-paste between vim and system clipboard | ||||
| vim.api.nvim_set_keymap('v', '<C-c>', '"+y', { noremap = true, silent = true, desc = 'Copy to system clipboard' }) | ||||
| vim.api.nvim_set_keymap('n', '<C-v>', '"+p', { noremap = true, silent = true, desc = 'Paste from system clipboard' }) | ||||
| vim.api.nvim_set_keymap('i', '<C-v>', '<C-r>+', { noremap = true, silent = true, desc = 'Paste from system clipboard in insert mode' }) | ||||
| vim.api.nvim_set_keymap( | ||||
|   'i', | ||||
|   '<C-v>', | ||||
|   '<C-r>+', | ||||
|   { noremap = true, silent = true, desc = 'Paste from system clipboard in insert mode' } | ||||
| ) | ||||
| 
 | ||||
| -- -- Configure diagnostic display after VimEnter to ensure the module is loaded | ||||
| -- vim.api.nvim_create_autocmd('VimEnter', { | ||||
|  | @ -1312,6 +1333,5 @@ vim.api.nvim_set_keymap('i', '<C-v>', '<C-r>+', { noremap = true, silent = true, | |||
| --   end, | ||||
| -- }) | ||||
| 
 | ||||
| 
 | ||||
| -- The line beneath this is called `modeline`. See `:help modeline` | ||||
| -- vim: ts=2 sts=2 sw=2 et | ||||
|  |  | |||
|  | @ -1,17 +1,38 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| return { | ||||
|   { | ||||
|     'jackMort/ChatGPT.nvim', | ||||
|     event = 'VeryLazy', | ||||
|     config = function() | ||||
|       require('chatgpt').setup { | ||||
|       local prompts_url = 'https://raw.githubusercontent.com/julianobarbosa' .. '/custom-gpt-prompts/main/prompt.csv' | ||||
|       require('chatgpt').setup({ | ||||
|         api_key_cmd = 'pass show azure/hypera/oai/idg-dev/token', | ||||
|         api_host_cmd = 'echo -n ""', | ||||
|         api_type_cmd = 'echo azure', | ||||
|         azure_api_base_cmd = 'pass show azure/hypera/oai/idg-dev/base', | ||||
|         azure_api_engine_cmd = 'pass show azure/hypera/oai/idg-dev/engine', | ||||
|         azure_api_version_cmd = 'pass show azure/hypera/oai/idg-dev/api-version', | ||||
|         predefined_chat_gpt_prompts = 'https://raw.githubusercontent.com/julianobarbosa/custom-gpt-prompts/main/prompt.csv', | ||||
|       } | ||||
|         predefined_chat_gpt_prompts = prompts_url, | ||||
|       }) | ||||
|     end, | ||||
|     dependencies = { | ||||
|       'MunifTanjim/nui.nvim', | ||||
|  |  | |||
|  | @ -1,3 +1,23 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| return { | ||||
|   'github/copilot.vim', | ||||
|   opts = { | ||||
|  | @ -22,8 +42,8 @@ return { | |||
|       ['gitcommit'] = { | ||||
|         enable = true, | ||||
|         -- Disable using previous commit messages as suggestions | ||||
|         previous_commit_history = false | ||||
|       } | ||||
|         previous_commit_history = false, | ||||
|       }, | ||||
|     } | ||||
|   end, | ||||
| } | ||||
|  |  | |||
|  | @ -1,3 +1,23 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| -- python-debugging.lua: Debugging Python code with DAP | ||||
| -- | ||||
| 
 | ||||
|  | @ -5,17 +25,53 @@ return { | |||
|   { | ||||
|     'mfussenegger/nvim-dap', | ||||
|     dependencies = { | ||||
|       'mfussenegger/nvim-dap-python',  -- Python adapter | ||||
|       'rcarriga/nvim-dap-ui',          -- UI for DAP | ||||
|       'theHamsta/nvim-dap-virtual-text' -- Inline variable text | ||||
|       'mfussenegger/nvim-dap-python', -- Python adapter | ||||
|       'rcarriga/nvim-dap-ui', -- UI for DAP | ||||
|       'theHamsta/nvim-dap-virtual-text', -- Inline variable text | ||||
|     }, | ||||
|     keys = { | ||||
|       { '<leader>dc', function() require('dap').continue() end, desc = 'Debug: Start/Continue' }, | ||||
|       { '<leader>db', function() require('dap').toggle_breakpoint() end, desc = 'Debug: Toggle Breakpoint' }, | ||||
|       { '<leader>dt', function() require('dap').terminate() end, desc = 'Debug: Terminate' }, | ||||
|       { '<leader>di', function() require('dap').step_into() end, desc = 'Debug: Step Into' }, | ||||
|       { '<leader>do', function() require('dap').step_over() end, desc = 'Debug: Step Over' }, | ||||
|       { '<leader>dr', function() require('dap').repl.open() end, desc = 'Debug: Open REPL' }, | ||||
|       { | ||||
|         '<leader>dc', | ||||
|         function() | ||||
|           require('dap').continue() | ||||
|         end, | ||||
|         desc = 'Debug: Start/Continue', | ||||
|       }, | ||||
|       { | ||||
|         '<leader>db', | ||||
|         function() | ||||
|           require('dap').toggle_breakpoint() | ||||
|         end, | ||||
|         desc = 'Debug: Toggle Breakpoint', | ||||
|       }, | ||||
|       { | ||||
|         '<leader>dt', | ||||
|         function() | ||||
|           require('dap').terminate() | ||||
|         end, | ||||
|         desc = 'Debug: Terminate', | ||||
|       }, | ||||
|       { | ||||
|         '<leader>di', | ||||
|         function() | ||||
|           require('dap').step_into() | ||||
|         end, | ||||
|         desc = 'Debug: Step Into', | ||||
|       }, | ||||
|       { | ||||
|         '<leader>do', | ||||
|         function() | ||||
|           require('dap').step_over() | ||||
|         end, | ||||
|         desc = 'Debug: Step Over', | ||||
|       }, | ||||
|       { | ||||
|         '<leader>dr', | ||||
|         function() | ||||
|           require('dap').repl.open() | ||||
|         end, | ||||
|         desc = 'Debug: Open REPL', | ||||
|       }, | ||||
|     }, | ||||
|     config = function() | ||||
|       local dap = require('dap') | ||||
|  | @ -28,11 +84,17 @@ return { | |||
|       require('dap-python').setup(vim.fn.exepath('python3')) | ||||
| 
 | ||||
|       -- Auto open/close dapui | ||||
|       dap.listeners.after.event_initialized['dapui_config'] = function() dapui.open() end | ||||
|       dap.listeners.before.event_terminated['dapui_config'] = function() dapui.close() end | ||||
|       dap.listeners.before.event_exited['dapui_config'] = function() dapui.close() end | ||||
|     end | ||||
|   } | ||||
|       dap.listeners.after.event_initialized['dapui_config'] = function() | ||||
|         dapui.open() | ||||
|       end | ||||
|       dap.listeners.before.event_terminated['dapui_config'] = function() | ||||
|         dapui.close() | ||||
|       end | ||||
|       dap.listeners.before.event_exited['dapui_config'] = function() | ||||
|         dapui.close() | ||||
|       end | ||||
|     end, | ||||
|   }, | ||||
| } | ||||
| 
 | ||||
| -- The line beneath this is called `modeline`. See `:help modeline` | ||||
|  |  | |||
|  | @ -1,67 +1,89 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| return { | ||||
|   "nvim-neo-tree/neo-tree.nvim", | ||||
|   dependencies = { "MunifTanjim/nui.nvim" }, | ||||
|   cmd = "Neotree", | ||||
|   init = function() vim.g.neo_tree_remove_legacy_commands = true end, | ||||
|   'nvim-neo-tree/neo-tree.nvim', | ||||
|   dependencies = { 'MunifTanjim/nui.nvim' }, | ||||
|   cmd = 'Neotree', | ||||
|   init = function() | ||||
|     vim.g.neo_tree_remove_legacy_commands = true | ||||
|   end, | ||||
|   opts = function() | ||||
|     return { | ||||
|       auto_clean_after_session_restore = true, | ||||
|       close_if_last_window = true, | ||||
|       sources = { "filesystem", "buffers", "git_status" }, | ||||
|       sources = { 'filesystem', 'buffers', 'git_status' }, | ||||
|       source_selector = { | ||||
|         sources = { | ||||
|           { source = "filesystem", display_name = "  Files " }, | ||||
|           { source = "git_status", display_name = "  Git " }, | ||||
|           { source = 'filesystem', display_name = '  Files ' }, | ||||
|           { source = 'git_status', display_name = '  Git ' }, | ||||
|         }, | ||||
|       }, | ||||
|       default_component_configs = { | ||||
|         icon = { | ||||
|           folder_empty = "!", | ||||
|           folder_empty_open = "!O", | ||||
|           folder_empty = '!', | ||||
|           folder_empty_open = '!O', | ||||
|         }, | ||||
|         git_status = { | ||||
|           symbols = { | ||||
|             renamed  = "", | ||||
|             unstaged = "💣", | ||||
|             renamed = '', | ||||
|             unstaged = '💣', | ||||
|           }, | ||||
|         }, | ||||
|       }, | ||||
|       document_symbols = { | ||||
|         kinds = { | ||||
|           File = { icon = "", hl = "Tag" }, | ||||
|           Namespace = { icon = "", hl = "Include" }, | ||||
|           Package = { icon = "", hl = "Label" }, | ||||
|           Class = { icon = "", hl = "Include" }, | ||||
|           Property = { icon = "", hl = "@property" }, | ||||
|           Enum = { icon = "", hl = "@number" }, | ||||
|           Function = { icon = "", hl = "Function" }, | ||||
|           String = { icon = "", hl = "String" }, | ||||
|           Number = { icon = "", hl = "Number" }, | ||||
|           Array = { icon = "", hl = "Type" }, | ||||
|           Object = { icon = "", hl = "Type" }, | ||||
|           Key = { icon = "", hl = "" }, | ||||
|           Struct = { icon = "", hl = "Type" }, | ||||
|           Operator = { icon = "", hl = "Operator" }, | ||||
|           TypeParameter = { icon = "", hl = "Type" }, | ||||
|           File = { icon = '', hl = 'Tag' }, | ||||
|           Namespace = { icon = '', hl = 'Include' }, | ||||
|           Package = { icon = '', hl = 'Label' }, | ||||
|           Class = { icon = '', hl = 'Include' }, | ||||
|           Property = { icon = '', hl = '@property' }, | ||||
|           Enum = { icon = '', hl = '@number' }, | ||||
|           Function = { icon = '', hl = 'Function' }, | ||||
|           String = { icon = '', hl = 'String' }, | ||||
|           Number = { icon = '', hl = 'Number' }, | ||||
|           Array = { icon = '', hl = 'Type' }, | ||||
|           Object = { icon = '', hl = 'Type' }, | ||||
|           Key = { icon = '', hl = '' }, | ||||
|           Struct = { icon = '', hl = 'Type' }, | ||||
|           Operator = { icon = '', hl = 'Operator' }, | ||||
|           TypeParameter = { icon = '', hl = 'Type' }, | ||||
|           StaticMethod = { icon = ' ', hl = 'Function' }, | ||||
|         }, | ||||
|       }, | ||||
|       commands = { | ||||
|         parent_or_close = function(state) | ||||
|           local node = state.tree:get_node() | ||||
|           if (node.type == "directory" or node:has_children()) and node:is_expanded() then | ||||
|           if (node.type == 'directory' or node:has_children()) and node:is_expanded() then | ||||
|             state.commands.toggle_node(state) | ||||
|           else | ||||
|             require("neo-tree.ui.renderer").focus_node(state, node:get_parent_id()) | ||||
|             require('neo-tree.ui.renderer').focus_node(state, node:get_parent_id()) | ||||
|           end | ||||
|         end, | ||||
|         child_or_open = function(state) | ||||
|           local node = state.tree:get_node() | ||||
|           if node.type == "directory" or node:has_children() then | ||||
|           if node.type == 'directory' or node:has_children() then | ||||
|             if not node:is_expanded() then -- if unexpanded, expand | ||||
|               state.commands.toggle_node(state) | ||||
|             else                           -- if expanded and has children, seleect the next child | ||||
|               require("neo-tree.ui.renderer").focus_node(state, node:get_child_ids()[1]) | ||||
|             else -- if expanded and has children, seleect the next child | ||||
|               require('neo-tree.ui.renderer').focus_node(state, node:get_child_ids()[1]) | ||||
|             end | ||||
|           else -- if not a directory just open it | ||||
|             state.commands.open(state) | ||||
|  | @ -74,62 +96,64 @@ return { | |||
|           local modify = vim.fn.fnamemodify | ||||
| 
 | ||||
|           local results = { | ||||
|             e = { val = modify(filename, ":e"), msg = "Extension only" }, | ||||
|             f = { val = filename, msg = "Filename" }, | ||||
|             F = { val = modify(filename, ":r"), msg = "Filename w/o extension" }, | ||||
|             h = { val = modify(filepath, ":~"), msg = "Path relative to Home" }, | ||||
|             p = { val = modify(filepath, ":."), msg = "Path relative to CWD" }, | ||||
|             P = { val = filepath, msg = "Absolute path" }, | ||||
|             e = { val = modify(filename, ':e'), msg = 'Extension only' }, | ||||
|             f = { val = filename, msg = 'Filename' }, | ||||
|             F = { val = modify(filename, ':r'), msg = 'Filename w/o extension' }, | ||||
|             h = { val = modify(filepath, ':~'), msg = 'Path relative to Home' }, | ||||
|             p = { val = modify(filepath, ':.'), msg = 'Path relative to CWD' }, | ||||
|             P = { val = filepath, msg = 'Absolute path' }, | ||||
|           } | ||||
| 
 | ||||
|           local messages = { | ||||
|             { "\nChoose to copy to clipboard:\n", "Normal" }, | ||||
|             { '\nChoose to copy to clipboard:\n', 'Normal' }, | ||||
|           } | ||||
|           for i, result in pairs(results) do | ||||
|             if result.val and result.val ~= "" then | ||||
|             if result.val and result.val ~= '' then | ||||
|               vim.list_extend(messages, { | ||||
|                 { ("%s."):format(i),           "Identifier" }, | ||||
|                 { (" %s: "):format(result.msg) }, | ||||
|                 { result.val,                  "String" }, | ||||
|                 { "\n" }, | ||||
|                 { ('%s.'):format(i), 'Identifier' }, | ||||
|                 { (' %s: '):format(result.msg) }, | ||||
|                 { result.val, 'String' }, | ||||
|                 { '\n' }, | ||||
|               }) | ||||
|             end | ||||
|           end | ||||
|           vim.api.nvim_echo(messages, false, {}) | ||||
|           local result = results[vim.fn.getcharstr()] | ||||
|           if result and result.val and result.val ~= "" then | ||||
|             vim.fn.setreg("+", result.val) | ||||
|           if result and result.val and result.val ~= '' then | ||||
|             vim.fn.setreg('+', result.val) | ||||
|           end | ||||
|         end, | ||||
|         find_in_dir = function(state) | ||||
|           local node = state.tree:get_node() | ||||
|           local path = node:get_id() | ||||
|           require("telescope.builtin").find_files { | ||||
|             cwd = node.type == "directory" and path or vim.fn.fnamemodify(path, ":h"), | ||||
|           } | ||||
|           require('telescope.builtin').find_files({ | ||||
|             cwd = node.type == 'directory' and path or vim.fn.fnamemodify(path, ':h'), | ||||
|           }) | ||||
|         end, | ||||
|       }, | ||||
|       window = { | ||||
|         width = 30, | ||||
|         mappings = { | ||||
|           ["<space>"] = false, -- disable space until we figure out which-key disabling | ||||
|           ["[b"] = "prev_source", | ||||
|           ["]b"] = "next_source", | ||||
|           Y = "copy_selector", | ||||
|           h = "parent_or_close", | ||||
|           l = "child_or_open", | ||||
|           o = "open", | ||||
|           ['<space>'] = false, -- disable space until we figure out which-key disabling | ||||
|           ['[b'] = 'prev_source', | ||||
|           [']b'] = 'next_source', | ||||
|           Y = 'copy_selector', | ||||
|           h = 'parent_or_close', | ||||
|           l = 'child_or_open', | ||||
|           o = 'open', | ||||
|         }, | ||||
|       }, | ||||
|       filesystem = { | ||||
|         follow_current_file = true, | ||||
|         hijack_netrw_behavior = "open_current", | ||||
|         hijack_netrw_behavior = 'open_current', | ||||
|         use_libuv_file_watcher = true, | ||||
|       }, | ||||
|       event_handlers = { | ||||
|         { | ||||
|           event = "neo_tree_buffer_enter", | ||||
|           handler = function(_) vim.opt_local.signcolumn = "auto" end, | ||||
|           event = 'neo_tree_buffer_enter', | ||||
|           handler = function(_) | ||||
|             vim.opt_local.signcolumn = 'auto' | ||||
|           end, | ||||
|         }, | ||||
|       }, | ||||
|     } | ||||
|  |  | |||
|  | @ -1,9 +1,34 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| return { | ||||
|   'ThePrimeagen/harpoon', | ||||
|   config = function() | ||||
|     require('harpoon').setup() | ||||
|     vim.keymap.set('n', '<leader>ha', require('harpoon.mark').add_file, { desc = '[H]arpoon [A]dd file' }) | ||||
|     vim.keymap.set('n', '<leader>ht', require('harpoon.ui').toggle_quick_menu, { desc = '[H]arpoon [T]oggle quick menu' }) | ||||
|     vim.keymap.set( | ||||
|       'n', | ||||
|       '<leader>ht', | ||||
|       require('harpoon.ui').toggle_quick_menu, | ||||
|       { desc = '[H]arpoon [T]oggle quick menu' } | ||||
|     ) | ||||
|     vim.keymap.set('n', '<leader>hn', require('harpoon.ui').nav_next, { desc = '[H]arpoon nav [N]ext' }) | ||||
|     vim.keymap.set('n', '<leader>hp', require('harpoon.ui').nav_prev, { desc = '[H]arpoon nav [P]revious' }) | ||||
|     vim.keymap.set('n', '<leader>h1', function() | ||||
|  |  | |||
|  | @ -1,10 +1,35 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| -- You can add your own plugins here or in other files in this directory! | ||||
| --  I promise not to create any merge conflicts in this directory :) | ||||
| -- | ||||
| -- See the kickstart.nvim README for more information | ||||
| return { | ||||
|   -- Add trouble.nvim plugin | ||||
|   { 'folke/trouble.nvim', event = 'VimEnter', dependencies = { 'nvim-tree/nvim-web-devicons' }, config = function() | ||||
|     require('trouble').setup {} | ||||
|   end }, | ||||
|   { | ||||
|     'folke/trouble.nvim', | ||||
|     event = 'VimEnter', | ||||
|     dependencies = { 'nvim-tree/nvim-web-devicons' }, | ||||
|     config = function() | ||||
|       require('trouble').setup({}) | ||||
|     end, | ||||
|   }, | ||||
| } | ||||
|  |  | |||
|  | @ -1,3 +1,28 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| if not vim then | ||||
|   return | ||||
| end | ||||
| local bufnr = vim.api.nvim_get_current_buf() | ||||
| 
 | ||||
| return { | ||||
|   -- local function map(mode, lhs, rhs, opts) | ||||
|   --   local options = { noremap=true, silent=true } | ||||
|  | @ -7,31 +32,21 @@ return { | |||
|   --   vim.api.nvim_set_keymap(mode, lhs, rhs, options) | ||||
|   -- end | ||||
| 
 | ||||
|   vim.keymap.set('n', '<leader>ff', ":Telescope find_files<cr>", {}), | ||||
|   vim.keymap.set('n', '<leader>fg', ":Telescope live_grep<cr>", {}), | ||||
|   vim.keymap.set('n', '<leader>fb', ":Telescope buffers<cr>", {}), | ||||
|   vim.keymap.set('n', '<leader>fh', ":Telescope help_tags", {}), | ||||
|   vim.keymap.set('n', '<leader>ff', ':Telescope find_files<cr>', {}), | ||||
|   vim.keymap.set('n', '<leader>fg', ':Telescope live_grep<cr>', {}), | ||||
|   vim.keymap.set('n', '<leader>fb', ':Telescope buffers<cr>', {}), | ||||
|   vim.keymap.set('n', '<leader>fh', ':Telescope help_tags', {}), | ||||
| 
 | ||||
|   -- map("n", "<s-h>", ":bn") | ||||
|   vim.keymap.set( | ||||
|     'n', | ||||
|     '<S-h>', | ||||
|     ":bp<cr>", | ||||
|     { | ||||
|       buffer = bufnr, | ||||
|       desc = '[G]o to [P]revious Buffer' | ||||
|     } | ||||
|   ), | ||||
|   vim.keymap.set('n', '<S-h>', ':bp<cr>', { | ||||
|     buffer = bufnr, | ||||
|     desc = '[G]o to [P]revious Buffer', | ||||
|   }), | ||||
|   -- map("n", "<s-l>", ":bp") | ||||
|   vim.keymap.set( | ||||
|     'n', | ||||
|     '<S-l>', | ||||
|     ":bn<cr>", | ||||
|     { | ||||
|       buffer = bufnr, | ||||
|       desc = '[G]o to [N]ext Buffer' | ||||
|     } | ||||
|   ) | ||||
|   vim.keymap.set('n', '<S-l>', ':bn<cr>', { | ||||
|     buffer = bufnr, | ||||
|     desc = '[G]o to [N]ext Buffer', | ||||
|   }), | ||||
| 
 | ||||
|   -- map("n", "<leader>bq", ":Bdelete") | ||||
|   -- vim.keymap.set( | ||||
|  |  | |||
|  | @ -1,3 +1,23 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| -- python-debugging.lua: Debugging Python code with DAP | ||||
| -- | ||||
| 
 | ||||
|  | @ -45,7 +65,7 @@ return { | |||
|         repl_definition = { | ||||
|           python = { | ||||
|             command = function() | ||||
|               local ipythonAvailable = vim.fn.executable 'ipython' == 1 | ||||
|               local ipythonAvailable = vim.fn.executable('ipython') == 1 | ||||
|               local binary = ipythonAvailable and 'ipython' or 'python3' | ||||
|               return { binary } | ||||
|             end, | ||||
|  |  | |||
|  | @ -1,3 +1,27 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| if not vim then | ||||
|   return | ||||
| end | ||||
| 
 | ||||
| -- [[ Basic Keymaps ]] | ||||
| --  See `:help vim.keymap.set()` | ||||
| 
 | ||||
|  | @ -38,9 +62,9 @@ vim.keymap.set('n', '<leader>wa', ':wall<CR>', { noremap = true, desc = '[W]rite | |||
| vim.keymap.set('n', '<leader>wf', ':w<CR>', { noremap = true, desc = '[W]rite [F]ile' }) | ||||
| 
 | ||||
| -- Create command do save with qw | ||||
| vim.api.nvim_command 'cmap qw wq' | ||||
| vim.api.nvim_command 'cmap WQ wq' | ||||
| vim.api.nvim_command 'cmap QW wq' | ||||
| vim.api.nvim_command('cmap qw wq') | ||||
| vim.api.nvim_command('cmap WQ wq') | ||||
| vim.api.nvim_command('cmap QW wq') | ||||
| 
 | ||||
| -- Navigate buffers | ||||
| vim.keymap.set('n', '<S-h>', ':bp<CR>', { noremap = true, desc = '[G]oto [P]revious Buffer' }) | ||||
|  | @ -58,4 +82,9 @@ vim.keymap.set('n', '<leader>taa', ':!make applyA<CR>', opts) | |||
| -- Better copy-paste between vim and system clipboard | ||||
| vim.api.nvim_set_keymap('v', '<C-c>', '"+y', { noremap = true, silent = true, desc = 'Copy to system clipboard' }) | ||||
| vim.api.nvim_set_keymap('n', '<C-v>', '"+p', { noremap = true, silent = true, desc = 'Paste from system clipboard' }) | ||||
| vim.api.nvim_set_keymap('i', '<C-v>', '<C-r>+', { noremap = true, silent = true, desc = 'Paste from system clipboard in insert mode' }) | ||||
| vim.api.nvim_set_keymap( | ||||
|   'i', | ||||
|   '<C-v>', | ||||
|   '<C-r>+', | ||||
|   { noremap = true, silent = true, desc = 'Paste from system clipboard in insert mode' } | ||||
| ) | ||||
|  |  | |||
|  | @ -1,3 +1,23 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| --[[ | ||||
| -- | ||||
| -- This file is not required for your own configuration, | ||||
|  | @ -21,7 +41,7 @@ end | |||
| 
 | ||||
| local check_external_reqs = function() | ||||
|   -- Basic utils: `git`, `make`, `unzip` | ||||
|   for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do | ||||
|   for _, exe in ipairs({ 'git', 'make', 'unzip', 'rg' }) do | ||||
|     local is_executable = vim.fn.executable(exe) == 1 | ||||
|     if is_executable then | ||||
|       vim.health.ok(string.format("Found executable: '%s'", exe)) | ||||
|  | @ -35,13 +55,13 @@ end | |||
| 
 | ||||
| return { | ||||
|   check = function() | ||||
|     vim.health.start 'kickstart.nvim' | ||||
|     vim.health.start('kickstart.nvim') | ||||
| 
 | ||||
|     vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth` | ||||
|     vim.health.info([[NOTE: Not every warning is a 'must-fix' in `:checkhealth` | ||||
| 
 | ||||
|   Fix only warnings for plugins and languages you intend to use. | ||||
|     Mason will give warnings for languages that are not installed. | ||||
|     You do not need to install, unless you want to use those languages!]] | ||||
|     You do not need to install, unless you want to use those languages!]]) | ||||
| 
 | ||||
|     local uv = vim.uv or vim.loop | ||||
|     vim.health.info('System Information: ' .. vim.inspect(uv.os_uname())) | ||||
|  |  | |||
|  | @ -1,3 +1,23 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| -- autoformat.lua | ||||
| -- | ||||
| -- Use your language server to automatically format your code on save. | ||||
|  | @ -60,12 +80,12 @@ return { | |||
|               return | ||||
|             end | ||||
| 
 | ||||
|             vim.lsp.buf.format { | ||||
|             vim.lsp.buf.format({ | ||||
|               async = false, | ||||
|               filter = function(c) | ||||
|                 return c.id == client.id | ||||
|               end, | ||||
|             } | ||||
|             }) | ||||
|           end, | ||||
|         }) | ||||
|       end, | ||||
|  |  | |||
|  | @ -1,3 +1,23 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| -- autopairs | ||||
| -- https://github.com/windwp/nvim-autopairs | ||||
| 
 | ||||
|  | @ -7,10 +27,10 @@ return { | |||
|   -- Optional dependency | ||||
|   dependencies = { 'hrsh7th/nvim-cmp' }, | ||||
|   config = function() | ||||
|     require('nvim-autopairs').setup {} | ||||
|     require('nvim-autopairs').setup({}) | ||||
|     -- If you want to automatically add `(` after selecting a function or method | ||||
|     local cmp_autopairs = require 'nvim-autopairs.completion.cmp' | ||||
|     local cmp = require 'cmp' | ||||
|     local cmp_autopairs = require('nvim-autopairs.completion.cmp') | ||||
|     local cmp = require('cmp') | ||||
|     cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done()) | ||||
|   end, | ||||
| } | ||||
|  |  | |||
|  | @ -1,3 +1,23 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| -- debug.la | ||||
| -- | ||||
| -- Shows how to use the DAP plugin to debug your code. | ||||
|  | @ -69,7 +89,7 @@ return { | |||
|     { | ||||
|       '<leader>B', | ||||
|       function() | ||||
|         require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') | ||||
|         require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: ')) | ||||
|       end, | ||||
|       desc = 'Debug: Set Breakpoint', | ||||
|     }, | ||||
|  | @ -83,13 +103,11 @@ return { | |||
|     }, | ||||
|   }, | ||||
|   config = function() | ||||
|     local dap = require 'dap' | ||||
|     local dapui = require 'dapui' | ||||
|     local path = require('mason-registry').get_package('debugpy'):get_install_path() | ||||
|     local dap = require('dap') | ||||
|     local dapui = require('dapui') | ||||
|     require('dap-python').setup(os.getenv('PYENV_ROOT') .. '/versions/3.11.9/bin/python') | ||||
| 
 | ||||
|     require('dap-python').setup(os.getenv 'PYENV_ROOT' .. '/versions/3.11.9/bin/python') | ||||
| 
 | ||||
|     require('mason-nvim-dap').setup { | ||||
|     require('mason-nvim-dap').setup({ | ||||
|       -- Makes a best effort to setup the various debuggers with | ||||
|       -- reasonable debug configurations | ||||
|       automatic_installation = true, | ||||
|  | @ -109,11 +127,11 @@ return { | |||
|         'jq', | ||||
|         'stylua', | ||||
|       }, | ||||
|     } | ||||
|     }) | ||||
| 
 | ||||
|     -- Dap UI setup | ||||
|     -- For more information, see |:help nvim-dap-ui| | ||||
|     dapui.setup { | ||||
|     dapui.setup({ | ||||
|       -- Set icons to characters that are more likely to work in every terminal. | ||||
|       --    Feel free to remove or use ones that you like more! :) | ||||
|       --    Don't feel like these are good choices. | ||||
|  | @ -131,7 +149,7 @@ return { | |||
|           disconnect = '⏏', | ||||
|         }, | ||||
|       }, | ||||
|     } | ||||
|     }) | ||||
| 
 | ||||
|     -- Change breakpoint icons | ||||
|     -- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' }) | ||||
|  | @ -150,12 +168,12 @@ return { | |||
|     dap.listeners.before.event_exited['dapui_config'] = dapui.close | ||||
| 
 | ||||
|     -- Install golang specific config | ||||
|     require('dap-go').setup { | ||||
|     require('dap-go').setup({ | ||||
|       delve = { | ||||
|         -- On Windows delve must be run attached or it crashes. | ||||
|         -- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring | ||||
|         detached = vim.fn.has 'win32' == 0, | ||||
|         detached = vim.fn.has('win32') == 0, | ||||
|       }, | ||||
|     } | ||||
|     }) | ||||
|   end, | ||||
| } | ||||
|  |  | |||
|  | @ -1,3 +1,23 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| -- Adds git related signs to the gutter, as well as utilities for managing changes | ||||
| -- NOTE: gitsigns is already included in init.lua but contains only the base | ||||
| -- config. This will add also the recommended keymaps. | ||||
|  | @ -7,7 +27,7 @@ return { | |||
|     'lewis6991/gitsigns.nvim', | ||||
|     opts = { | ||||
|       on_attach = function(bufnr) | ||||
|         local gitsigns = require 'gitsigns' | ||||
|         local gitsigns = require('gitsigns') | ||||
| 
 | ||||
|         local function map(mode, l, r, opts) | ||||
|           opts = opts or {} | ||||
|  | @ -18,27 +38,27 @@ return { | |||
|         -- Navigation | ||||
|         map('n', ']c', function() | ||||
|           if vim.wo.diff then | ||||
|             vim.cmd.normal { ']c', bang = true } | ||||
|             vim.cmd.normal({ ']c', bang = true }) | ||||
|           else | ||||
|             gitsigns.nav_hunk 'next' | ||||
|             gitsigns.nav_hunk('next') | ||||
|           end | ||||
|         end, { desc = 'Jump to next git [c]hange' }) | ||||
| 
 | ||||
|         map('n', '[c', function() | ||||
|           if vim.wo.diff then | ||||
|             vim.cmd.normal { '[c', bang = true } | ||||
|             vim.cmd.normal({ '[c', bang = true }) | ||||
|           else | ||||
|             gitsigns.nav_hunk 'prev' | ||||
|             gitsigns.nav_hunk('prev') | ||||
|           end | ||||
|         end, { desc = 'Jump to previous git [c]hange' }) | ||||
| 
 | ||||
|         -- Actions | ||||
|         -- visual mode | ||||
|         map('v', '<leader>hs', function() | ||||
|           gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } | ||||
|           gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) | ||||
|         end, { desc = 'git [s]tage hunk' }) | ||||
|         map('v', '<leader>hr', function() | ||||
|           gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } | ||||
|           gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) | ||||
|         end, { desc = 'git [r]eset hunk' }) | ||||
|         -- normal mode | ||||
|         map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) | ||||
|  | @ -50,7 +70,7 @@ return { | |||
|         map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' }) | ||||
|         map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' }) | ||||
|         map('n', '<leader>hD', function() | ||||
|           gitsigns.diffthis '@' | ||||
|           gitsigns.diffthis('@') | ||||
|         end, { desc = 'git [D]iff against last commit' }) | ||||
|         -- Toggles | ||||
|         map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) | ||||
|  |  | |||
|  | @ -1,10 +1,30 @@ | |||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| return { | ||||
| 
 | ||||
|   { -- Linting | ||||
|     'mfussenegger/nvim-lint', | ||||
|     event = { 'BufReadPre', 'BufNewFile' }, | ||||
|     config = function() | ||||
|       local lint = require 'lint' | ||||
|       local lint = require('lint') | ||||
|       lint.linters_by_ft = { | ||||
|         dockerfile = { 'hadolint' }, | ||||
|         json = { 'jsonlint' }, | ||||
|  |  | |||
|  | @ -1,32 +1,37 @@ | |||
| # Current Session Context | ||||
| *Last Updated: 2025-02-18 18:31* | ||||
| # Neovim Configuration Active Context | ||||
| 
 | ||||
| ## Current State | ||||
| - Working on mode_manager plugin integration | ||||
| - Focusing on proper plugin specification and initialization | ||||
| - Implementing enhanced mode state management system | ||||
| ## Current Session Context | ||||
| [2024-02-22 13:00] Initial Memory Bank setup | ||||
| 
 | ||||
| ## Recent Changes | ||||
| - Created backup branch of pre-rollback state | ||||
| - Rolled back codebase to v0.1.0 tag | ||||
| - Previous state preserved in backup branch | ||||
| - Started mode_manager plugin implementation | ||||
| 
 | ||||
| ## Active Decisions | ||||
| 1. Using Memory Bank for configuration documentation | ||||
| 2. Following Kickstart.nvim's modular approach | ||||
| 3. Implementing comprehensive LSP integration | ||||
| 4. Using mode-based workflow with persistent Plan/Act toggle | ||||
| 5. Implementing enhanced mode state management system | ||||
| - Created Memory Bank structure | ||||
| - Initialized core documentation files | ||||
| - Established project organization | ||||
| 
 | ||||
| ## Current Focus | ||||
| - Implementing mode_manager plugin properly | ||||
| - Resolving plugin specification issues | ||||
| - Setting up proper initialization hooks | ||||
| - Integrating with custom_statusline | ||||
| - Setting up base configuration structure | ||||
| - Documenting existing setup | ||||
| - Planning plugin organization | ||||
| 
 | ||||
| ## Active Decisions | ||||
| 1. Using modular Lua configuration | ||||
| 2. Implementing lazy plugin loading | ||||
| 3. Organizing debug capabilities | ||||
| 
 | ||||
| ## Next Steps | ||||
| 1. Review existing plugin configurations | ||||
| 2. Document current plugin setup | ||||
| 3. Evaluate debug integration | ||||
| 4. Plan performance optimizations | ||||
| 
 | ||||
| ## Open Questions | ||||
| - What were the key changes between v0.1.0 and the rolled back state? | ||||
| - Which features need to be reimplemented or reconsidered? | ||||
| - How to prevent future need for rollbacks? | ||||
| - How to best structure the mode_manager plugin initialization? | ||||
| 1. Which plugins need custom configurations? | ||||
| 2. Are there any performance bottlenecks? | ||||
| 3. What debug adapters are required? | ||||
| 4. How to optimize startup time? | ||||
| 
 | ||||
| ## Implementation Notes | ||||
| - Need to document plugin dependencies | ||||
| - Consider startup performance | ||||
| - Review debug configuration needs | ||||
| - Plan LSP server setup | ||||
|  |  | |||
|  | @ -1,24 +1,33 @@ | |||
| # Project Overview: Neovim Configuration | ||||
| # Neovim Configuration Product Context | ||||
| 
 | ||||
| ## Purpose | ||||
| This project is a personal Neovim configuration based on Kickstart.nvim framework, designed to provide a powerful yet maintainable development environment. | ||||
| This Neovim configuration exists to provide a powerful, customizable development environment that enhances productivity through modern editor features and efficient workflow patterns. | ||||
| 
 | ||||
| ## Goals | ||||
| 1. Create a productive and efficient development environment | ||||
| 2. Maintain a clean and organized configuration structure | ||||
| 3. Support multiple programming languages | ||||
| 4. Provide essential IDE-like features through LSP integration | ||||
| ## Problems Solved | ||||
| 1. Complex plugin management | ||||
| 2. Development environment setup time | ||||
| 3. Code navigation efficiency | ||||
| 4. Debug workflow integration | ||||
| 5. Configuration maintainability | ||||
| 
 | ||||
| ## Key Features | ||||
| - LSP integration for multiple languages | ||||
| - Fuzzy finding with Telescope | ||||
| - Git integration | ||||
| - Code formatting and linting | ||||
| - Syntax highlighting with Treesitter | ||||
| - Completion with nvim-cmp | ||||
| ## Intended Usage | ||||
| - Primary development environment for coding | ||||
| - Plugin management through Lua modules | ||||
| - Integrated debugging capabilities | ||||
| - Efficient code navigation and completion | ||||
| - Custom keybindings and commands | ||||
| 
 | ||||
| ## User Experience Goals | ||||
| - Fast and responsive editing | ||||
| - Intuitive keybindings | ||||
| - Clear visual feedback | ||||
| - Minimal configuration needed for basic use | ||||
| 1. Fast and responsive editing | ||||
| 2. Intuitive plugin management | ||||
| 3. Clear error feedback | ||||
| 4. Efficient code navigation | ||||
| 5. Seamless debugging experience | ||||
| 6. Easy configuration updates | ||||
| 
 | ||||
| ## Design Principles | ||||
| 1. Modularity: Separate concerns for easier maintenance | ||||
| 2. Performance: Optimize for speed and responsiveness | ||||
| 3. Clarity: Clear structure and documentation | ||||
| 4. Extensibility: Easy to add new features | ||||
| 5. Reliability: Stable and predictable behavior | ||||
|  |  | |||
|  | @ -1,41 +1,46 @@ | |||
| # Progress Update | ||||
| # Neovim Configuration Progress | ||||
| 
 | ||||
| ## Current Status | ||||
| Working on mode_manager plugin implementation with enhanced state management. | ||||
| [2024-02-22 13:01] Memory Bank initialization | ||||
| 
 | ||||
| ## Completed Tasks | ||||
| 1. System rollback to v0.1.0 | ||||
|    - Created backup branch | ||||
|    - Successfully rolled back to stable version | ||||
|    - Preserved previous state | ||||
| ### What Works | ||||
| - Basic directory structure | ||||
| - Core documentation setup | ||||
| - Initial project organization | ||||
| 
 | ||||
| 2. Architecture Planning | ||||
|    - Defined enhanced mode state management system | ||||
|    - Documented implementation phases | ||||
|    - Established integration patterns | ||||
| ### In Progress | ||||
| 1. Documentation of existing setup | ||||
| 2. Plugin configuration review | ||||
| 3. Debug capability assessment | ||||
| 
 | ||||
| ## In Progress | ||||
| 1. Mode Manager Plugin Implementation: | ||||
|    - Converting mode_manager.lua into proper plugin structure | ||||
|    - Setting up initialization hooks | ||||
|    - Implementing state persistence layer | ||||
|    - Adding event system foundations | ||||
| 
 | ||||
| 2. Integration Work: | ||||
|    - Configuring plugin specification in init.lua | ||||
|    - Setting up custom_statusline integration | ||||
|    - Implementing mode-aware functionality | ||||
| ### Known Issues | ||||
| - Need to document current plugin dependencies | ||||
| - Debug configuration needs review | ||||
| - Performance optimization opportunities | ||||
| - LSP setup documentation needed | ||||
| 
 | ||||
| ## Next Steps | ||||
| 1. Complete core state management implementation | ||||
| 2. Add event system with hooks and queuing | ||||
| 3. Implement persistence layer with versioning | ||||
| 4. Set up plugin and UI integration components | ||||
| 
 | ||||
| ## Technical Requirements | ||||
| - Proper plugin specification format | ||||
| - Local plugin integration | ||||
| - Correct module initialization | ||||
| - State persistence mechanisms | ||||
| - Event handling system | ||||
| - Integration interfaces | ||||
| ### Short Term | ||||
| 1. Review and document current plugin setup | ||||
| 2. Assess debug integration status | ||||
| 3. Document LSP configuration | ||||
| 4. Map performance bottlenecks | ||||
| 
 | ||||
| ### Medium Term | ||||
| 1. Optimize plugin loading | ||||
| 2. Enhance debug capabilities | ||||
| 3. Improve LSP integration | ||||
| 4. Add custom keybindings | ||||
| 
 | ||||
| ### Long Term | ||||
| 1. Create comprehensive documentation | ||||
| 2. Implement performance improvements | ||||
| 3. Extend debug functionality | ||||
| 4. Enhance plugin ecosystem | ||||
| 
 | ||||
| ## Completed Work | ||||
| [2024-02-22] | ||||
| - Created Memory Bank structure | ||||
| - Initialized core documentation | ||||
| - Established project organization | ||||
|  |  | |||
|  | @ -0,0 +1,25 @@ | |||
| # Neovim Configuration Project Brief | ||||
| 
 | ||||
| ## Project Overview | ||||
| Custom Neovim configuration project focused on creating an optimized, maintainable, and feature-rich development environment using Lua. | ||||
| 
 | ||||
| ## Core Requirements | ||||
| 1. Modular plugin management | ||||
| 2. Efficient code navigation and editing | ||||
| 3. Debugging capabilities | ||||
| 4. Code completion and LSP support | ||||
| 5. Clean and maintainable configuration structure | ||||
| 
 | ||||
| ## Project Goals | ||||
| - Create a well-organized Neovim configuration | ||||
| - Implement efficient plugin management | ||||
| - Establish consistent coding patterns | ||||
| - Enable debugging capabilities | ||||
| - Maintain documentation for future reference | ||||
| 
 | ||||
| ## Success Criteria | ||||
| 1. Working plugin system | ||||
| 2. Functional debugging setup | ||||
| 3. Clear configuration structure | ||||
| 4. Documented setup and usage | ||||
| 5. Maintainable codebase | ||||
|  | @ -1,73 +1,65 @@ | |||
| # System Architecture & Patterns | ||||
| # Neovim Configuration System Patterns | ||||
| 
 | ||||
| ## Core Architecture | ||||
| - Plugin management via lazy.nvim | ||||
| - LSP-based intellisense and code navigation | ||||
| - Event-driven configuration loading | ||||
| - Modular plugin configuration | ||||
| - Enhanced mode state management system | ||||
| ## Architecture Overview | ||||
| 
 | ||||
| ## Key Design Patterns | ||||
| ### Directory Structure | ||||
| ``` | ||||
| . | ||||
| ├── init.lua              # Main entry point | ||||
| ├── lua/ | ||||
| │   ├── custom/          # Custom configurations | ||||
| │   │   └── plugins/     # Plugin-specific settings | ||||
| │   └── kickstart/       # Core functionality | ||||
| │       └── plugins/     # Plugin management | ||||
| ``` | ||||
| 
 | ||||
| 1. Mode Management | ||||
|    - Advanced state persistence | ||||
|    - Event-driven mode transitions | ||||
|    - Mode-specific context preservation | ||||
|    - Pre/post mode change hooks | ||||
|    - Mode validation system | ||||
|    - Mode-specific settings store | ||||
| ## Design Patterns | ||||
| 
 | ||||
| 2. Event System | ||||
|    - Hierarchical event handling | ||||
|    - Event queueing mechanism | ||||
|    - Async event processing | ||||
|    - Event prioritization | ||||
|    - Mode-specific event handlers | ||||
| ### Plugin Management | ||||
| - Module-based plugin organization | ||||
| - Lazy loading for performance | ||||
| - Plugin-specific configuration isolation | ||||
| - Conditional plugin loading | ||||
| 
 | ||||
| 3. Persistence Layer | ||||
|    - Versioned state storage | ||||
|    - State migration system | ||||
|    - Corruption detection | ||||
|    - Fallback mechanisms | ||||
|    - Incremental state updates | ||||
| ### Configuration Patterns | ||||
| 1. Modular Configuration | ||||
|    - Separate files for different concerns | ||||
|    - Clear dependency management | ||||
|    - Isolated plugin configurations | ||||
| 
 | ||||
| 4. Integration Patterns | ||||
|    - Mode-aware plugin system | ||||
|    - LSP integration with mode context | ||||
|    - Buffer grouping by mode | ||||
|    - Window layout persistence | ||||
|    - Mode-specific UI elements | ||||
| 2. Event-Driven Setup | ||||
|    - Lazy plugin loading | ||||
|    - Event-based initialization | ||||
|    - Conditional feature enabling | ||||
| 
 | ||||
| 5. Configuration Patterns | ||||
|    - Centralized keybinding management | ||||
|    - Plugin-specific configuration in separate modules | ||||
|    - Default options set through vim.opt | ||||
|    - Autocmd groups for event handling | ||||
|    - Mode-specific settings and behaviors | ||||
| 3. Error Handling | ||||
|    - Protected calls for plugin setup | ||||
|    - Fallback configurations | ||||
|    - Clear error reporting | ||||
| 
 | ||||
| 6. LSP Integration | ||||
|    - Mason for LSP server management | ||||
|    - Uniform LSP configuration across languages | ||||
|    - Shared capabilities for completion | ||||
|    - Mode-specific language server configurations | ||||
| ## Component Relationships | ||||
| 1. Core System | ||||
|    - init.lua loads core modules | ||||
|    - Establishes basic editor settings | ||||
|    - Sets up plugin management | ||||
| 
 | ||||
| 7. Component Relationships | ||||
|    - Mode Manager ↔ Event System | ||||
|    - Event System ↔ Persistence Layer | ||||
|    - Mode Manager ↔ Status Line | ||||
|    - LSP ↔ Mode Context | ||||
|    - Buffer Groups ↔ Mode State | ||||
|    - Window Layout ↔ Mode State | ||||
|    - Plugins ↔ Mode Context | ||||
| 2. Plugin System | ||||
|    - Managed through lua/custom/plugins | ||||
|    - Isolated plugin configurations | ||||
|    - Dependency handling | ||||
| 
 | ||||
| ## Implementation Standards | ||||
| - Lua for all configuration | ||||
| - Consistent error handling | ||||
| - Modular plugin organization | ||||
| - Clear separation of concerns | ||||
| - Mode-aware functionality | ||||
| - State validation | ||||
| - Event-driven architecture | ||||
| - Robust error recovery | ||||
| - Configuration versioning | ||||
| - Context preservation | ||||
| 3. Debug Integration | ||||
|    - Separate debug configuration | ||||
|    - Language-specific adapters | ||||
|    - Custom debug commands | ||||
| 
 | ||||
| ## Technical Decisions | ||||
| 1. Lua-based configuration for: | ||||
|    - Better performance | ||||
|    - More powerful customization | ||||
|    - Cleaner syntax | ||||
| 
 | ||||
| 2. Modular structure for: | ||||
|    - Easier maintenance | ||||
|    - Better organization | ||||
|    - Simplified updates | ||||
|  |  | |||
|  | @ -1,45 +1,58 @@ | |||
| # Technical Context | ||||
| # Neovim Configuration Technical Context | ||||
| 
 | ||||
| ## Core Technologies | ||||
| - Neovim (Text Editor) | ||||
| - Lua (Configuration Language) | ||||
| - Lazy.nvim (Plugin Manager) | ||||
| ## Technologies Used | ||||
| 
 | ||||
| ## Major Dependencies | ||||
| 1. LSP Servers & Tools | ||||
|    - lua_ls | ||||
|    - gopls | ||||
|    - pyright | ||||
|    - terraform-ls | ||||
|    - and many others managed by Mason | ||||
| ### Core | ||||
| - Neovim (>= 0.8.0) | ||||
| - Lua (>= 5.1) | ||||
| - Git (for plugin management) | ||||
| 
 | ||||
| 2. Key Plugins | ||||
|    - nvim-lspconfig: LSP configuration | ||||
|    - telescope.nvim: Fuzzy finder | ||||
|    - nvim-treesitter: Syntax highlighting | ||||
|    - nvim-cmp: Completion engine | ||||
|    - conform.nvim: Code formatting | ||||
|    - which-key.nvim: Keybinding help | ||||
|    - mini.nvim: Collection of utilities | ||||
| ### Plugin Management | ||||
| - lazy.nvim (plugin manager) | ||||
| - LSP configurations | ||||
| - Treesitter for syntax | ||||
| - Debug Adapter Protocol (DAP) | ||||
| 
 | ||||
| ## Development Setup | ||||
| - Uses the Kickstart.nvim framework as base | ||||
| - Nerd Font required for icons | ||||
| - Python 3 support configured | ||||
| - Git integration via fugitive and gitsigns | ||||
| 
 | ||||
| ### Requirements | ||||
| 1. Neovim installation | ||||
| 2. Git for plugin management | ||||
| 3. Language servers for LSP | ||||
| 4. Compilation tools for Treesitter | ||||
| 5. Debug adapters for debugging | ||||
| 
 | ||||
| ### Configuration Structure | ||||
| 1. Main Configuration | ||||
|    - init.lua: Entry point | ||||
|    - lua/custom/: Custom configurations | ||||
|    - lua/kickstart/: Core functionality | ||||
| 
 | ||||
| 2. Plugin Management | ||||
|    - Lazy-loaded plugins | ||||
|    - Plugin-specific settings | ||||
|    - Custom plugin configurations | ||||
| 
 | ||||
| ## Technical Constraints | ||||
| - Dependent on external LSP servers | ||||
| - Requires Neovim 0.8.0 or higher | ||||
| - Some features require system dependencies (make, git) | ||||
| - Terminal with true color support recommended | ||||
| 
 | ||||
| ## Configuration Structure | ||||
| ``` | ||||
| . | ||||
| ├── init.lua (Main configuration) | ||||
| └── lua/ | ||||
|     ├── kickstart/ | ||||
|     │   └── plugins/ (Plugin-specific configs) | ||||
|     └── custom/ | ||||
|         └── plugins/ (Custom plugin configs) | ||||
| ### Performance | ||||
| - Lazy loading required for plugins | ||||
| - Careful management of startup time | ||||
| - Efficient event handling | ||||
| 
 | ||||
| ### Compatibility | ||||
| - Neovim version requirements | ||||
| - LSP server compatibility | ||||
| - Debug adapter requirements | ||||
| 
 | ||||
| ### Dependencies | ||||
| - External language servers | ||||
| - System-level development tools | ||||
| - Plugin-specific requirements | ||||
| 
 | ||||
| ## Development Tools | ||||
| 1. LSP Servers | ||||
| 2. Debug Adapters | ||||
| 3. Treesitter Parsers | ||||
| 4. Code Formatters | ||||
| 5. Linters | ||||
|  |  | |||
|  | @ -1,12 +1,43 @@ | |||
| local link = s({ | ||||
|   trig = "link", | ||||
|   name = "Link", | ||||
|   dscr = "Web link" | ||||
| }, { | ||||
|   t({ "`" }), | ||||
|   i(1, "Title"), | ||||
|   t(" <"), | ||||
|   i(2, "link"), | ||||
|   t(">`_"), | ||||
|   i(0) | ||||
| }) | ||||
| # MIT License | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
| # of this software and associated documentation files (the "Software"), to deal | ||||
| # in the Software without restriction, including without limitation the rights | ||||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| # copies of the Software, and to permit persons to whom the Software is | ||||
| # furnished to do so, subject to the following conditions: | ||||
| # | ||||
| # The above copyright notice and this permission notice shall be included in all | ||||
| # copies or substantial portions of the Software. | ||||
| # | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||
| # SOFTWARE. | ||||
| 
 | ||||
| if not vim then | ||||
|   return | ||||
| end | ||||
| 
 | ||||
| local ok, ls = pcall(require, 'luasnip') | ||||
| if not ok then | ||||
|   return | ||||
| end | ||||
| 
 | ||||
| local s = ls.snippet | ||||
| local i = ls.insert_node | ||||
| 
 | ||||
| return { | ||||
|   s({ | ||||
|     trig = 'link', | ||||
|     name = 'Link', | ||||
|     dscr = 'Web link', | ||||
|   }, { | ||||
|     i(1, 'Title'), | ||||
|     i(2, 'link'), | ||||
|     i(0), | ||||
|   }), | ||||
| } | ||||
|  |  | |||
|  | @ -0,0 +1,6 @@ | |||
| column_width = 120 | ||||
| line_endings = "Unix" | ||||
| indent_type = "Spaces" | ||||
| indent_width = 2 | ||||
| quote_style = "AutoPreferSingle" | ||||
| no_call_parentheses = false | ||||
|  | @ -1,4 +1,4 @@ | |||
| # {project name} | ||||
| # High Level Design | ||||
| 
 | ||||
| ## 1. Project Details | ||||
| - **Project Name**: {Project Name from BRD} | ||||
|  | @ -41,13 +41,12 @@ | |||
| ## 5. System Overview | ||||
| 
 | ||||
| ### 5.1 System Context | ||||
| - {Description of the system's high-level context a  nd its place in the broader ecosystem.} | ||||
| - {Description of the system's high-level context and its place in the broader ecosystem.} | ||||
| 
 | ||||
| ### 5.2 System Goals and   Objectives | ||||
| - {System Goals and   Objectives} | ||||
| ### 5.2 System Goals and Objectives | ||||
| - {System Goals and Objectives} | ||||
| - **Primary Goals**: | ||||
|   - Goal 1:  | ||||
| Description of goal. | ||||
|   - Goal 1: Description of goal. | ||||
|   - Goal 2: Description of goal. | ||||
| - **Performance Objectives**: | ||||
|   - {Expected system performance objectives.} | ||||
|  | @ -62,11 +61,11 @@ Description of goal. | |||
| - {List of internal systems involved in this design.} | ||||
| 
 | ||||
| ### 6.3 High-Level Component Diagram | ||||
| - {As a software architect, create a mermaid component diagram based on provided Data Flow Diagram and aling that to   the requirement} | ||||
| - {As a software architect, create a mermaid component diagram based on provided Data Flow Diagram and align that to the requirement} | ||||
| 
 | ||||
| ### 6.4 Component Descriptions | ||||
| 
 | ||||
| #### 6.4.1 {Comp  onent Name} | ||||
| #### 6.4.1 {Component Name} | ||||
| - **Responsibility**: {Responsibilities of the component} | ||||
| - **Interfaces**: {Interfaces provided or used by the component.} | ||||
| - **Dependencies**: {Dependencies on other components or systems.} | ||||
|  | @ -75,8 +74,7 @@ Description of goal. | |||
| ## 7. System Interactions | ||||
| 
 | ||||
| ### 7.1 External System Interactions | ||||
| - {Description of interactions with ex | ||||
| ternal systems or services.} | ||||
| - {Description of interactions with external systems or services.} | ||||
| 
 | ||||
| ### 7.2 Communication Protocols | ||||
| - {Details of communication mechanisms, protocols, and data exchange formats.} | ||||
|  | @ -85,8 +83,7 @@ ternal systems or services.} | |||
| ## 8. Performance Considerations | ||||
| 
 | ||||
| ### 8.1 Performance Requirements | ||||
| - {Expected response times, sca | ||||
| lability requirements, and concurrent user handling.} | ||||
| - {Expected response times, scalability requirements, and concurrent user handling.} | ||||
| 
 | ||||
| ### 8.2 Performance Constraints | ||||
| - {List known performance limitations or bottlenecks.} | ||||
|  | @ -95,8 +92,7 @@ lability requirements, and concurrent user handling.} | |||
| ## 9. Security Architecture | ||||
| 
 | ||||
| ### 9.1 Security Requirements | ||||
| - {Authentication mechanisms, authorization strategies, and dat | ||||
| a encryption approaches from BRD & Instructions.} | ||||
| - {Authentication mechanisms, authorization strategies, and data encryption approaches from BRD & Instructions.} | ||||
| 
 | ||||
| ### 9.2 Threat Mitigation | ||||
| - {Strategies for addressing potential security vulnerabilities.} | ||||
|  | @ -105,8 +101,7 @@ a encryption approaches from BRD & Instructions.} | |||
| ## 10. Deployment Architecture | ||||
| 
 | ||||
| ### 10.1 Deployment Topology | ||||
| - {Describe deployment environments (Development, Stagin | ||||
| g, Production).} | ||||
| - {Describe deployment environments (Development, Staging, Production).} | ||||
| 
 | ||||
| ### 10.2 Infrastructure Requirements | ||||
| - {Hardware specifications, network configuration, and cloud/on-premise considerations.} | ||||
|  | @ -115,8 +110,7 @@ g, Production).} | |||
| ## 11. Technology Stack | ||||
| 
 | ||||
| ### 11.1 Programming Languages | ||||
| - {List primary programming l | ||||
| anguages.} | ||||
| - {List primary programming languages.} | ||||
| 
 | ||||
| ### 11.2 Frameworks and Libraries | ||||
| - {Enumerate key frameworks and libraries.} | ||||
|  | @ -127,8 +121,7 @@ anguages.} | |||
| 
 | ||||
| ## 12. Constraints and Assumptions | ||||
| 
 | ||||
| ### 12. | ||||
| 1 Technical Constraints | ||||
| ### 12.1 Technical Constraints | ||||
| - {List technical limitations or restrictions.} | ||||
| 
 | ||||
| ### 12.2 Business Constraints | ||||
|  | @ -137,25 +130,23 @@ anguages.} | |||
| 
 | ||||
| ## 13. Open Issues and Risks | ||||
| 
 | ||||
| ### 13. | ||||
| 1 Known Risks | ||||
| ### 13.1 Known Risks | ||||
| - {Identify potential risks and mitigation strategies.} | ||||
| 
 | ||||
| ### 13.2 Unresolved Design Decisions | ||||
| - {List any pe  n | ||||
| ding design decisions.} | ||||
| - {List any pending design decisions.} | ||||
| 
 | ||||
| 
 | ||||
| ## 14. Appendices | ||||
| 
 | ||||
|     ### 14.1 Glossary | ||||
| - {Define    technical te----rms and acronyms.} | ||||
| ### 14.1 Glossary | ||||
| - {Define technical terms and acronyms.} | ||||
| 
 | ||||
| ### 1---4.2 References | ||||
| - {Any links fr    om BRD}   | ||||
| ### 14.2 References | ||||
| - {Any links from BRD} | ||||
| 
 | ||||
| 
 | ||||
| ## 15. Revision    History | ||||
| ## 15. Revision History | ||||
| 
 | ||||
| | Version | Date       | Description   | Author      | | ||||
| |---------|------------|---------------|-------------| | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue