diff options
Diffstat (limited to 'vim/.config')
38 files changed, 2162 insertions, 0 deletions
diff --git a/vim/.config/nvim/.luarc.json b/vim/.config/nvim/.luarc.json new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/vim/.config/nvim/.luarc.json diff --git a/vim/.config/nvim/init.lua b/vim/.config/nvim/init.lua new file mode 100644 index 0000000..3fa4cb9 --- /dev/null +++ b/vim/.config/nvim/init.lua @@ -0,0 +1,159 @@ +-- +-- nvim init script by grace +-- + +-- Get hostname +local handle = io.popen("hostname") +local hostname = handle:read("*a") or "" +handle:close() +hostname = hostname:gsub("%s+", "") +vim.g.hostname = hostname +if string.match(hostname, "cs.purdue.edu") then + vim.g.is_purdue = true +else + vim.g.is_purdue = false +end + +-- add required things to path +if vim.g.is_purdue then + vim.env.PATH = vim.env.PATH .. ':' .. os.getenv("HOME") .. '/clangd/bin:/u/riker/u98/cs240/bin' +end + +require("plugins") +require("native-lsp") +require("diagnostics") +require("remap") + + +if vim.g.is_purdue then + require("westwood-lint") +end + +require("standard-lint") + +vim.cmd("source ~/.vim/settings.vim") + +vim.api.nvim_create_autocmd("BufWritePre", { + pattern = "*", + callback = function() + local save = vim.fn.winsaveview() + vim.cmd([[%s/\s\+$//e]]) + vim.fn.winrestview(save) + end, +}) + + +-- File IO can be slow and this might help idk +if vim.g.is_purdue then + vim.cmd("set noundofile") -- i forgor how to do this in lua so i didnt +end + +-- +-- vim.opt.spell = true +-- vim.opt.spelllang = "en_us" +-- + +vim.api.nvim_create_autocmd("FileType", { + pattern = "markdown", + callback = function() + vim.opt_local.textwidth = 80 + vim.opt_local.formatoptions = "atcqjnl" + vim.opt_local.wrap = true + vim.opt_local.linebreak = true + + -- Show column guide + vim.opt_local.colorcolumn = "80" + end, +}) + +-- Typst configuration +vim.api.nvim_create_autocmd("FileType", { + pattern = "typst", + callback = function() + -- Line wrapping settings + vim.opt_local.textwidth = 80 + vim.opt_local.formatoptions = "tcqjnl" + vim.opt_local.wrap = true + vim.opt_local.linebreak = true + -- Show column guide + vim.opt_local.colorcolumn = "80" + + -- Toggle 'a' in formatoptions + vim.keymap.set("n", "<leader>a", function() + local fo = vim.opt_local.formatoptions:get() + if fo.a then + vim.opt_local.formatoptions:remove("a") + print("Auto-formatting disabled") + else + vim.opt_local.formatoptions:append("a") + print("Auto-formatting enabled") + end + end, { buffer = true, desc = "Toggle auto-formatting" }) + end, +}) +-- Setup formatting on LSP attach +-- vim.api.nvim_create_autocmd("LspAttach", { +-- callback = function(args) +-- local client = vim.lsp.get_client_by_id(args.data.client_id) +-- +-- if client and client.supports_method("textDocument/formatting") then +-- vim.api.nvim_create_autocmd({ "TextChanged", "TextChangedI" }, { +-- buffer = args.buf, +-- callback = function() +-- vim.lsp.buf.format({ +-- async = true, +-- bufnr = args.buf, +-- }) +-- end, +-- }) +-- end +-- end, +-- }) + +vim.api.nvim_create_autocmd("TermOpen", { + pattern = "*", + callback = function() + vim.opt_local.spell = false + end, +}) + +vim.o.clipboard = "unnamedplus" + +-- vim.g.clipboard = { +-- name = "OSC 52", +-- copy = { +-- ["+"] = require("vim.ui.clipboard.osc52").copy("+"), +-- ["*"] = require("vim.ui.clipboard.osc52").copy("*"), +-- }, +-- paste = { +-- ["+"] = require("vim.ui.clipboard.osc52").paste("+"), +-- ["*"] = require("vim.ui.clipboard.osc52").paste("*"), +-- }, +-- } +vim.g.clipboard = "osc52" +vim.keymap.set("n", "p", '"+p') +vim.keymap.set("n", "P", '"+P') + + +-- stupid hacky workaround to make it so i can paste from tmux with OSC52 +-- https://github.com/neovim/neovim/discussions/29350#discussioncomment-10299517 +-- tracking issue about tmux behavior: https://github.com/tmux/tmux/issues/4275 +if vim.env.TMUX ~= nil then + local copy = { 'tmux', 'load-buffer', '-w', '-' } + local paste = { 'bash', '-c', 'tmux refresh-client -l && sleep 0.05 && tmux save-buffer -' } + vim.g.clipboard = { + name = 'tmux', + copy = { + ['+'] = copy, + ['*'] = copy, + }, + paste = { + ['+'] = paste, + ['*'] = paste, + }, + cache_enabled = 0, + } +end + +-- https://simondalvai.org/blog/godot-neovim/ +require("godot") diff --git a/vim/.config/nvim/lsp/asm-lsp.lua b/vim/.config/nvim/lsp/asm-lsp.lua new file mode 100644 index 0000000..28678c0 --- /dev/null +++ b/vim/.config/nvim/lsp/asm-lsp.lua @@ -0,0 +1,15 @@ +---@brief +--- +--- https://github.com/bergercookie/asm-lsp +--- +--- Language Server for NASM/GAS/GO Assembly +--- +--- `asm-lsp` can be installed via cargo: +--- cargo install asm-lsp + +---@type vim.lsp.Config +return { + cmd = { 'asm-lsp' }, + filetypes = { 'asm', 'vmasm' }, + root_markers = { '.asm-lsp.toml', '.git' }, +} diff --git a/vim/.config/nvim/lsp/astro.lua b/vim/.config/nvim/lsp/astro.lua new file mode 100644 index 0000000..45a9e8b --- /dev/null +++ b/vim/.config/nvim/lsp/astro.lua @@ -0,0 +1,10 @@ +return { + cmd = { 'astro-ls', '--stdio' }, + filetypes = { 'astro' }, + root_markers = { 'package.json', 'tsconfig.json', 'jsconfig.json', '.git', '.jj' }, + init_options = { + typescript = { + tsdk = "./node_modules/typescript/lib" + }, + }, +} diff --git a/vim/.config/nvim/lsp/basedpyright.lua b/vim/.config/nvim/lsp/basedpyright.lua new file mode 100644 index 0000000..86fb411 --- /dev/null +++ b/vim/.config/nvim/lsp/basedpyright.lua @@ -0,0 +1,67 @@ +---@brief +--- +--- https://detachhead.github.io/basedpyright +--- +--- `basedpyright`, a static type checker and language server for python + +local function set_python_path(command) + local path = command.args + local clients = vim.lsp.get_clients { + bufnr = vim.api.nvim_get_current_buf(), + name = 'basedpyright', + } + for _, client in ipairs(clients) do + if client.settings then + client.settings.python = vim.tbl_deep_extend('force', client.settings.python or {}, { pythonPath = path }) + else + client.config.settings = vim.tbl_deep_extend('force', client.config.settings, { python = { pythonPath = path } }) + end + client:notify('workspace/didChangeConfiguration', { settings = nil }) + end +end + +---@type vim.lsp.Config +return { + cmd = { 'basedpyright-langserver', '--stdio' }, + filetypes = { 'python' }, + root_markers = { + 'pyproject.toml', + 'setup.py', + 'setup.cfg', + 'requirements.txt', + 'Pipfile', + 'pyrightconfig.json', + '.git', + '.jj' + }, + settings = { + basedpyright = { + analysis = { + autoSearchPaths = true, + useLibraryCodeForTypes = true, + diagnosticMode = 'openFilesOnly', + }, + }, + }, + on_attach = function(client, bufnr) + vim.api.nvim_buf_create_user_command(bufnr, 'LspPyrightOrganizeImports', function() + local params = { + command = 'basedpyright.organizeimports', + arguments = { vim.uri_from_bufnr(bufnr) }, + } + + -- Using client.request() directly because "basedpyright.organizeimports" is private + -- (not advertised via capabilities), which client:exec_cmd() refuses to call. + -- https://github.com/neovim/neovim/blob/c333d64663d3b6e0dd9aa440e433d346af4a3d81/runtime/lua/vim/lsp/client.lua#L1024-L1030 + client.request('workspace/executeCommand', params, nil, bufnr) + end, { + desc = 'Organize Imports', + }) + + vim.api.nvim_buf_create_user_command(bufnr, 'LspPyrightSetPythonPath', set_python_path, { + desc = 'Reconfigure basedpyright with the provided python path', + nargs = 1, + complete = 'file', + }) + end, +} diff --git a/vim/.config/nvim/lsp/ccls.lua b/vim/.config/nvim/lsp/ccls.lua new file mode 100644 index 0000000..f0a08c5 --- /dev/null +++ b/vim/.config/nvim/lsp/ccls.lua @@ -0,0 +1,26 @@ +return { + cmd = { + 'clangd', + -- '--clang-tidy', + -- '--background-index', + -- '--offset-encoding=utf-8', + }, + filetypes = { 'arduino' }, + root_markers = { + '.clangd', + '.ccls', + 'compile_commands.json', + 'compile_flags.txt', + 'configure.ac' -- AutoTools + }, + single_file_support = true, + capabilities = { + textDocument = { + completion = { + editsNearCursor = true, + }, + }, + offsetEncoding = { 'utf-8', 'utf-16' }, + }, +} + diff --git a/vim/.config/nvim/lsp/clangd.lua b/vim/.config/nvim/lsp/clangd.lua new file mode 100644 index 0000000..a3add02 --- /dev/null +++ b/vim/.config/nvim/lsp/clangd.lua @@ -0,0 +1,33 @@ +return { + cmd = { + 'clangd', + -- '--clang-tidy', + '--background-index', + '--offset-encoding=utf-8', + '--query-driver=/Users/scie/.platformio/packages/toolchain-xtensa-esp32/**', + '--query-driver=/Users/scie/.platformio/packages/framework-arduinoststm32/**', + -- '--query-driver=/Users/scie/.platformio/packages/**', + -- '--query-driver=/opt/homebrew/Cellar/avr-gcc@9/9.4.0_1/bin/avr-gcc', + -- '--query-driver=/opt/homebrew/Cellar/avr-gcc@9/9.4.0_1/bin/avr-g++' + }, + filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda', 'proto', 'arduino' }, + root_markers = { + '.clangd', + '.clang-tidy', + '.clang-format', + 'compile_commands.json', + 'compile_flags.txt', + 'configure.ac', -- AutoTools + '.git', + '.jj' + }, + single_file_support = true, + capabilities = { + textDocument = { + completion = { + editsNearCursor = true, + }, + }, + offsetEncoding = { 'utf-8', 'utf-16' }, + }, +} diff --git a/vim/.config/nvim/lsp/codebook.lua b/vim/.config/nvim/lsp/codebook.lua new file mode 100644 index 0000000..226046e --- /dev/null +++ b/vim/.config/nvim/lsp/codebook.lua @@ -0,0 +1,40 @@ +---@brief +--- +--- https://github.com/blopker/codebook +--- +--- An unholy spell checker for code. +--- +--- `codebook-lsp` can be installed by following the instructions [here](https://github.com/blopker/codebook/blob/main/README.md#installation). +--- +--- The default `cmd` assumes that the `codebook-lsp` binary can be found in `$PATH`. +--- + +---@type vim.lsp.Config +return { + cmd = { 'codebook-lsp', 'serve' }, + filetypes = { + 'c', + 'css', + 'gitcommit', + 'go', + 'haskell', + 'html', + 'java', + 'javascript', + 'javascriptreact', + 'lua', + 'markdown', + 'php', + 'python', + 'ruby', + 'rust', + 'swift', + 'toml', + 'text', + 'typescript', + 'typescriptreact', + 'typst', + 'zig', + }, + root_markers = { '.git', '.jj', 'codebook.toml', '.codebook.toml' }, +} diff --git a/vim/.config/nvim/lsp/csharp-ls.lua b/vim/.config/nvim/lsp/csharp-ls.lua new file mode 100644 index 0000000..037650b --- /dev/null +++ b/vim/.config/nvim/lsp/csharp-ls.lua @@ -0,0 +1,9 @@ +---@type vim.lsp.Config +return { + cmd = { 'csharp-ls' }, + root_markers = { ".git" }, + filetypes = { 'cs' }, + init_options = { + AutomaticWorkspaceInit = true, + }, +} diff --git a/vim/.config/nvim/lsp/cspell-ls.lua b/vim/.config/nvim/lsp/cspell-ls.lua new file mode 100644 index 0000000..b3c60db --- /dev/null +++ b/vim/.config/nvim/lsp/cspell-ls.lua @@ -0,0 +1,30 @@ +---@brief +--- +--- [cspell language server](https://github.com/vlabo/cspell-lsp) +--- +return { + cmd = { 'cspell-lsp', '--stdio' }, + filetypes = { "go", "rust", "js", "ts", "html", "css", "json", "yaml", "markdown", "gitcommit", "typst", "lua", "htmlua", "c", "cpp", "arduino" }, + root_markers = { + '.git', + '.jj', + 'cspell.json', + '.cspell.json', + 'cspell.json', + '.cSpell.json', + 'cSpell.json', + 'cspell.config.js', + 'cspell.config.cjs', + 'cspell.config.json', + 'cspell.config.yaml', + 'cspell.config.yml', + 'cspell.yaml', + 'cspell.yml', + }, + init_options = { + userWordsFile = vim.fn.expand('~/.config/cspell/user-dictionary.txt'), + configPaths = { + vim.fn.expand('~/.cspell.json'), + }, + }, +} diff --git a/vim/.config/nvim/lsp/css.lua b/vim/.config/nvim/lsp/css.lua new file mode 100644 index 0000000..9314747 --- /dev/null +++ b/vim/.config/nvim/lsp/css.lua @@ -0,0 +1,34 @@ +---@brief +--- +--- https://github.com/hrsh7th/vscode-langservers-extracted +--- +--- `css-languageserver` can be installed via `npm`: +--- +--- ```sh +--- npm i -g vscode-langservers-extracted +--- ``` +--- +--- Neovim does not currently include built-in snippets. `vscode-css-language-server` only provides completions when snippet support is enabled. To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. +--- +--- ```lua +--- --Enable (broadcasting) snippet capability for completion +--- local capabilities = vim.lsp.protocol.make_client_capabilities() +--- capabilities.textDocument.completion.completionItem.snippetSupport = true +--- +--- vim.lsp.config('cssls', { +--- capabilities = capabilities, +--- }) +--- ``` + +---@type vim.lsp.Config +return { + cmd = { 'vscode-css-language-server', '--stdio' }, + filetypes = { 'css', 'scss', 'less' }, + init_options = { provideFormatter = true }, -- needed to enable formatting capabilities + root_markers = { 'package.json', '.git', '.jj' }, + settings = { + css = { validate = true }, + scss = { validate = true }, + less = { validate = true }, + }, +} diff --git a/vim/.config/nvim/lsp/eslint.lua b/vim/.config/nvim/lsp/eslint.lua new file mode 100644 index 0000000..07d4ed7 --- /dev/null +++ b/vim/.config/nvim/lsp/eslint.lua @@ -0,0 +1,221 @@ +--- @brief +--- +--- https://github.com/hrsh7th/vscode-langservers-extracted +--- +--- `vscode-eslint-language-server` is a linting engine for JavaScript / Typescript. +--- It can be installed via `npm`: +--- +--- ```sh +--- npm i -g vscode-langservers-extracted +--- ``` +--- +--- The default `on_attach` config provides the `LspEslintFixAll` command that can be used to format a document on save: +--- ```lua +--- local base_on_attach = vim.lsp.config.eslint.on_attach +--- vim.lsp.config("eslint", { +--- on_attach = function(client, bufnr) +--- if not base_on_attach then return end +--- +--- base_on_attach(client, bufnr) +--- vim.api.nvim_create_autocmd("BufWritePre", { +--- buffer = bufnr, +--- command = "LspEslintFixAll", +--- }) +--- end, +--- }) +--- ``` +--- +--- See [vscode-eslint](https://github.com/microsoft/vscode-eslint/blob/55871979d7af184bf09af491b6ea35ebd56822cf/server/src/eslintServer.ts#L216-L229) for configuration options. +--- +--- Messages handled in lspconfig: `eslint/openDoc`, `eslint/confirmESLintExecution`, `eslint/probeFailed`, `eslint/noLibrary` +--- +--- Additional messages you can handle: `eslint/noConfig` +--- +--- ### Monorepo support +--- +--- `vscode-eslint-language-server` supports monorepos by default. It will automatically find the config file corresponding to the package you are working on. You can use different configs in different packages. +--- This works without the need of spawning multiple instances of `vscode-eslint-language-server`. +--- You can use a different version of ESLint in each package, but it is recommended to use the same version of ESLint in all packages. The location of the ESLint binary will be determined automatically. +--- +--- /!\ When using flat config files, you need to use them across all your packages in your monorepo, as it's a global setting for the server. +--- +--- ### Flat config in ESLint versions prior to 10.0 +--- +--- If you're using a ESLint version that supports both flat config and eslintrc (>= 8.21, < 10.0) and want to change +--- the [default behavior](https://eslint.org/blog/2023/10/flat-config-rollout-plans/), you'll need to set +--- `experimental.useFlatConfig` accordingly: +--- ```lua +--- vim.lsp.config("eslint", { +--- settings = { +--- experimental = { +--- -- If you want to use flat config on >= 8.21, < 9.0 +--- useFlatConfig = true, +--- -- Or if you want to use eslintrc on 9.* +--- -- useFlatConfig = false, +--- } +--- } +--- }) +--- ``` + +-- local util = require 'lspconfig.util' +local lsp = vim.lsp + +local eslint_config_files = { + '.eslintrc', + '.eslintrc.js', + '.eslintrc.cjs', + '.eslintrc.yaml', + '.eslintrc.yml', + '.eslintrc.json', + 'eslint.config.js', + 'eslint.config.mjs', + 'eslint.config.cjs', + 'eslint.config.ts', + 'eslint.config.mts', + 'eslint.config.cts', +} + +---@type vim.lsp.Config +return { + cmd = { 'vscode-eslint-language-server', '--stdio' }, + filetypes = { + 'javascript', + 'javascriptreact', + 'typescript', + 'typescriptreact', + 'vue', + 'svelte', + 'astro', + 'htmlangular', + }, + workspace_required = true, + -- on_attach = function(client, bufnr) + -- vim.api.nvim_buf_create_user_command(bufnr, 'LspEslintFixAll', function() + -- client:request_sync('workspace/executeCommand', { + -- command = 'eslint.applyAllFixes', + -- arguments = { + -- { + -- uri = vim.uri_from_bufnr(bufnr), + -- version = lsp.util.buf_versions[bufnr], + -- }, + -- }, + -- }, nil, bufnr) + -- end, {}) + -- end, + root_dir = function(bufnr, on_dir) + -- The project root is where the LSP can be started from + -- As stated in the documentation above, this LSP supports monorepos and simple projects. + -- We select then from the project root, which is identified by the presence of a package + -- manager lock file. + local root_markers = { 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml', 'bun.lockb', 'bun.lock' } + -- Give the root markers equal priority by wrapping them in a table + root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git', '.jj' } } + or vim.list_extend(root_markers, { '.git' }) + + -- exclude deno + if vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc', 'deno.lock' }) then + return + end + + -- We fallback to the current working directory if no project root is found + local project_root = vim.fs.root(bufnr, root_markers) or vim.fn.getcwd() + + -- We know that the buffer is using ESLint if it has a config file + -- in its directory tree. + -- + -- Eslint used to support package.json files as config files, but it doesn't anymore. + -- We keep this for backward compatibility. + -- local filename = vim.api.nvim_buf_get_name(bufnr) + -- local eslint_config_files_with_package_json = + -- util.insert_package_json(eslint_config_files, 'eslintConfig', filename) + -- local is_buffer_using_eslint = vim.fs.find(eslint_config_files_with_package_json, { + -- path = filename, + -- type = 'file', + -- limit = 1, + -- upward = true, + -- stop = vim.fs.dirname(project_root), + -- })[1] + -- if not is_buffer_using_eslint then + -- return + -- end + + on_dir(project_root) + end, + -- Refer to https://github.com/Microsoft/vscode-eslint#settings-options for documentation. + settings = { + validate = 'on', + ---@diagnostic disable-next-line: assign-type-mismatch + packageManager = nil, + useESLintClass = false, + experimental = {}, + codeActionOnSave = { + enable = false, + mode = 'all', + }, + format = true, + quiet = false, + onIgnoredFiles = 'off', + rulesCustomizations = {}, + run = 'onType', + problems = { + shortenToSingleLine = false, + }, + -- nodePath configures the directory in which the eslint server should start its node_modules resolution. + -- This path is relative to the workspace folder (root dir) of the server instance. + nodePath = '', + -- use the workspace folder location or the file location (if no workspace folder is open) as the working directory + workingDirectory = { mode = 'auto' }, + codeAction = { + disableRuleComment = { + enable = true, + location = 'separateLine', + }, + showDocumentation = { + enable = true, + }, + }, + }, + before_init = function(_, config) + -- The "workspaceFolder" is a VSCode concept. It limits how far the + -- server will traverse the file system when locating the ESLint config + -- file (e.g., .eslintrc). + local root_dir = config.root_dir + + if root_dir then + config.settings = config.settings or {} + config.settings.workspaceFolder = { + uri = root_dir, + name = vim.fn.fnamemodify(root_dir, ':t'), + } + + -- Support Yarn2 (PnP) projects + local pnp_cjs = root_dir .. '/.pnp.cjs' + local pnp_js = root_dir .. '/.pnp.js' + if type(config.cmd) == 'table' and (vim.uv.fs_stat(pnp_cjs) or vim.uv.fs_stat(pnp_js)) then + config.cmd = vim.list_extend({ 'yarn', 'exec' }, config.cmd --[[@as table]]) + end + end + end, + handlers = { + ['eslint/openDoc'] = function(_, result) + if result then + vim.ui.open(result.url) + end + return {} + end, + ['eslint/confirmESLintExecution'] = function(_, result) + if not result then + return + end + return 4 -- approved + end, + ['eslint/probeFailed'] = function() + vim.notify('[lspconfig] ESLint probe failed.', vim.log.levels.WARN) + return {} + end, + ['eslint/noLibrary'] = function() + vim.notify('[lspconfig] Unable to find ESLint library.', vim.log.levels.WARN) + return {} + end, + }, +} diff --git a/vim/.config/nvim/lsp/fish-lsp.lua b/vim/.config/nvim/lsp/fish-lsp.lua new file mode 100644 index 0000000..d0e6500 --- /dev/null +++ b/vim/.config/nvim/lsp/fish-lsp.lua @@ -0,0 +1,17 @@ +---@brief +--- +--- https://github.com/ndonfris/fish-lsp +--- +--- A Language Server Protocol (LSP) tailored for the fish shell. +--- This project aims to enhance the coding experience for fish, +--- by introducing a suite of intelligent features like auto-completion, +--- scope aware symbol analysis, per-token hover generation, and many others. +--- +--- [homepage](https://www.fish-lsp.dev/) + +---@type vim.lsp.Config +return { + cmd = { 'fish-lsp', 'start' }, + filetypes = { 'fish' }, + root_markers = { 'config.fish', '.git', '.jj' }, +} diff --git a/vim/.config/nvim/lsp/gdscript.lua b/vim/.config/nvim/lsp/gdscript.lua new file mode 100644 index 0000000..aaba5a3 --- /dev/null +++ b/vim/.config/nvim/lsp/gdscript.lua @@ -0,0 +1,9 @@ +local port = os.getenv 'GDScript_Port' or '6005' +local cmd = vim.lsp.rpc.connect('127.0.0.1', tonumber(port)) + +---@type vim.lsp.Config +return { + cmd = cmd, + filetypes = { 'gd', 'gdscript', 'gdscript3' }, + root_markers = { 'project.godot', '.git', '.jj' }, +} diff --git a/vim/.config/nvim/lsp/gopls.lua b/vim/.config/nvim/lsp/gopls.lua new file mode 100644 index 0000000..1cec249 --- /dev/null +++ b/vim/.config/nvim/lsp/gopls.lua @@ -0,0 +1,98 @@ +---@brief +--- +--- https://github.com/golang/tools/tree/master/gopls +--- +--- Google's lsp server for golang. + +--- @class go_dir_custom_args +--- +--- @field envvar_id string +--- +--- @field custom_subdir string? + +local mod_cache = nil +local std_lib = nil + +---@param custom_args go_dir_custom_args +---@param on_complete fun(dir: string | nil) +local function identify_go_dir(custom_args, on_complete) + local cmd = { 'go', 'env', custom_args.envvar_id } + vim.system(cmd, { text = true }, function(output) + local res = vim.trim(output.stdout or '') + if output.code == 0 and res ~= '' then + if custom_args.custom_subdir and custom_args.custom_subdir ~= '' then + res = res .. custom_args.custom_subdir + end + on_complete(res) + else + vim.schedule(function() + vim.notify( + ('[gopls] identify ' .. custom_args.envvar_id .. ' dir cmd failed with code %d: %s\n%s'):format( + output.code, + vim.inspect(cmd), + output.stderr + ) + ) + end) + on_complete(nil) + end + end) +end + +---@return string? +local function get_std_lib_dir() + if std_lib and std_lib ~= '' then + return std_lib + end + + identify_go_dir({ envvar_id = 'GOROOT', custom_subdir = '/src' }, function(dir) + if dir then + std_lib = dir + end + end) + return std_lib +end + +---@return string? +local function get_mod_cache_dir() + if mod_cache and mod_cache ~= '' then + return mod_cache + end + + identify_go_dir({ envvar_id = 'GOMODCACHE' }, function(dir) + if dir then + mod_cache = dir + end + end) + return mod_cache +end + +---@param fname string +---@return string? +local function get_root_dir(fname) + if mod_cache and fname:sub(1, #mod_cache) == mod_cache then + local clients = vim.lsp.get_clients({ name = 'gopls' }) + if #clients > 0 then + return clients[#clients].config.root_dir + end + end + if std_lib and fname:sub(1, #std_lib) == std_lib then + local clients = vim.lsp.get_clients({ name = 'gopls' }) + if #clients > 0 then + return clients[#clients].config.root_dir + end + end + return vim.fs.root(fname, 'go.work') or vim.fs.root(fname, 'go.mod') or vim.fs.root(fname, '.git') or vim.fs.root(fname, '.jj') +end + +return { + cmd = { 'gopls' }, + filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' }, + root_dir = function(bufnr, on_dir) + local fname = vim.api.nvim_buf_get_name(bufnr) + get_mod_cache_dir() + get_std_lib_dir() + -- see: https://github.com/neovim/nvim-lspconfig/issues/804 + on_dir(get_root_dir(fname)) + end, +} diff --git a/vim/.config/nvim/lsp/html.lua b/vim/.config/nvim/lsp/html.lua new file mode 100644 index 0000000..e9ac9c4 --- /dev/null +++ b/vim/.config/nvim/lsp/html.lua @@ -0,0 +1,36 @@ +---@brief +--- +--- https://github.com/hrsh7th/vscode-langservers-extracted +--- +--- `vscode-html-language-server` can be installed via `npm`: +--- ```sh +--- npm i -g vscode-langservers-extracted +--- ``` +--- +--- Neovim does not currently include built-in snippets. `vscode-html-language-server` only provides completions when snippet support is enabled. +--- To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. +--- +--- The code-formatting feature of the lsp can be controlled with the `provideFormatter` option. +--- +--- ```lua +--- --Enable (broadcasting) snippet capability for completion +--- local capabilities = vim.lsp.protocol.make_client_capabilities() +--- capabilities.textDocument.completion.completionItem.snippetSupport = true +--- +--- vim.lsp.config('html', { +--- capabilities = capabilities, +--- }) +--- ``` + +---@type vim.lsp.Config +return { + cmd = { 'vscode-html-language-server', '--stdio' }, + filetypes = { 'html' }, + root_markers = { 'package.json', '.git', '.jj' }, + settings = {}, + init_options = { + provideFormatter = true, + embeddedLanguages = { css = true, javascript = true }, + configurationSection = { 'html', 'css', 'javascript' }, + }, +} diff --git a/vim/.config/nvim/lsp/json.lua b/vim/.config/nvim/lsp/json.lua new file mode 100644 index 0000000..3ef906c --- /dev/null +++ b/vim/.config/nvim/lsp/json.lua @@ -0,0 +1,32 @@ +---@brief +--- +--- https://github.com/hrsh7th/vscode-langservers-extracted +--- +--- vscode-json-language-server, a language server for JSON and JSON schema +--- +--- `vscode-json-language-server` can be installed via `npm`: +--- ```sh +--- npm i -g vscode-langservers-extracted +--- ``` +--- +--- `vscode-json-language-server` only provides completions when snippet support is enabled. If you use Neovim older than v0.10 you need to enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. +--- +--- ```lua +--- --Enable (broadcasting) snippet capability for completion +--- local capabilities = vim.lsp.protocol.make_client_capabilities() +--- capabilities.textDocument.completion.completionItem.snippetSupport = true +--- +--- vim.lsp.config('jsonls', { +--- capabilities = capabilities, +--- }) +--- ``` + +---@type vim.lsp.Config +return { + cmd = { 'vscode-json-language-server', '--stdio' }, + filetypes = { 'json', 'jsonc' }, + init_options = { + provideFormatter = true, + }, + root_markers = { '.git', '.jj' }, +} diff --git a/vim/.config/nvim/lsp/luals.lua b/vim/.config/nvim/lsp/luals.lua new file mode 100644 index 0000000..745f38a --- /dev/null +++ b/vim/.config/nvim/lsp/luals.lua @@ -0,0 +1,5 @@ +return { + cmd = {'lua-language-server'}, + filetypes = {'lua'}, + root_markers = {'.luarc.json', '.luarc.jsonc'}, +} diff --git a/vim/.config/nvim/lsp/pyright.lua b/vim/.config/nvim/lsp/pyright.lua new file mode 100644 index 0000000..b501b85 --- /dev/null +++ b/vim/.config/nvim/lsp/pyright.lua @@ -0,0 +1,66 @@ +---@brief +--- +--- https://github.com/microsoft/pyright +--- +--- `pyright`, a static type checker and language server for python + +local function set_python_path(command) + local path = command.args + local clients = vim.lsp.get_clients { + bufnr = vim.api.nvim_get_current_buf(), + name = 'pyright', + } + for _, client in ipairs(clients) do + if client.settings then + client.settings.python = vim.tbl_deep_extend('force', client.settings.python, { pythonPath = path }) + else + client.config.settings = vim.tbl_deep_extend('force', client.config.settings, { python = { pythonPath = path } }) + end + client:notify('workspace/didChangeConfiguration', { settings = nil }) + end +end + +---@type vim.lsp.Config +return { + cmd = { 'pyright-langserver', '--stdio' }, + filetypes = { 'python' }, + root_markers = { + 'pyproject.toml', + 'setup.py', + 'setup.cfg', + 'requirements.txt', + 'Pipfile', + 'pyrightconfig.json', + '.git', + '.jj' + }, + settings = { + python = { + analysis = { + autoSearchPaths = true, + useLibraryCodeForTypes = true, + diagnosticMode = 'openFilesOnly', + }, + }, + }, + on_attach = function(client, bufnr) + vim.api.nvim_buf_create_user_command(bufnr, 'LspPyrightOrganizeImports', function() + local params = { + command = 'pyright.organizeimports', + arguments = { vim.uri_from_bufnr(bufnr) }, + } + + -- Using client.request() directly because "pyright.organizeimports" is private + -- (not advertised via capabilities), which client:exec_cmd() refuses to call. + -- https://github.com/neovim/neovim/blob/c333d64663d3b6e0dd9aa440e433d346af4a3d81/runtime/lua/vim/lsp/client.lua#L1024-L1030 + client.request('workspace/executeCommand', params, nil, bufnr) + end, { + desc = 'Organize Imports', + }) + vim.api.nvim_buf_create_user_command(bufnr, 'LspPyrightSetPythonPath', set_python_path, { + desc = 'Reconfigure pyright with the provided python path', + nargs = 1, + complete = 'file', + }) + end, +} diff --git a/vim/.config/nvim/lsp/ruff.lua b/vim/.config/nvim/lsp/ruff.lua new file mode 100644 index 0000000..7fb61ea --- /dev/null +++ b/vim/.config/nvim/lsp/ruff.lua @@ -0,0 +1,35 @@ +---@brief +--- +--- https://github.com/astral-sh/ruff +--- +--- A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code formatter, written in Rust. It can be installed via `pip`. +--- +--- ```sh +--- pip install ruff +--- ``` +--- +--- **Available in Ruff `v0.4.5` in beta and stabilized in Ruff `v0.5.3`.** +--- +--- This is the new built-in language server written in Rust. It supports the same feature set as `ruff-lsp`, but with superior performance and no installation required. Note that the `ruff-lsp` server will continue to be maintained until further notice. +--- +--- Server settings can be provided via: +--- +--- ```lua +--- vim.lsp.config('ruff', { +--- init_options = { +--- settings = { +--- -- Server settings should go here +--- } +--- } +--- }) +--- ``` +--- +--- Refer to the [documentation](https://docs.astral.sh/ruff/editors/) for more details. + +---@type vim.lsp.Config +return { + cmd = { 'ruff', 'server' }, + filetypes = { 'python' }, + root_markers = { 'pyproject.toml', 'ruff.toml', '.ruff.toml', '.git' }, + settings = {}, +} diff --git a/vim/.config/nvim/lsp/rust-analyzer.lua b/vim/.config/nvim/lsp/rust-analyzer.lua new file mode 100644 index 0000000..31c9b63 --- /dev/null +++ b/vim/.config/nvim/lsp/rust-analyzer.lua @@ -0,0 +1,15 @@ +return { + cmd = { "rust-analyzer" }, + filetypes = { "rust", "rs" }, + root_markers = { "Cargo.lock" }, + settings = { + ["rust-analyzer"] = { + check = { + command = "clippy", + }, + diagnostics = { + enable = true, + }, + }, + }, +} diff --git a/vim/.config/nvim/lsp/superhtml.lua b/vim/.config/nvim/lsp/superhtml.lua new file mode 100644 index 0000000..fcbe24b --- /dev/null +++ b/vim/.config/nvim/lsp/superhtml.lua @@ -0,0 +1,22 @@ +---@brief +--- +--- https://github.com/kristoff-it/superhtml +--- +--- HTML Language Server & Templating Language Library +--- +--- This LSP is designed to tightly adhere to the HTML spec as well as enforcing +--- some additional rules that ensure HTML clarity. +--- +--- If you want to disable HTML support for another HTML LSP, add the following +--- to your configuration: +--- +--- ```lua +--- vim.lsp.config('superhtml', { +--- filetypes = { 'superhtml' } +--- }) +--- ``` +return { + cmd = { 'superhtml', 'lsp' }, + filetypes = { 'superhtml', 'html', "htmldjango" }, + root_markers = { '.git', '.jj' }, +} diff --git a/vim/.config/nvim/lsp/tailwind-ls.lua b/vim/.config/nvim/lsp/tailwind-ls.lua new file mode 100644 index 0000000..9ab35a8 --- /dev/null +++ b/vim/.config/nvim/lsp/tailwind-ls.lua @@ -0,0 +1,62 @@ +return { + cmd = { 'tailwindcss-language-server', '--stdio' }, + filetypes = { + -- html + 'aspnetcorerazor', + 'astro', + 'astro-markdown', + 'blade', + 'clojure', + 'django-html', + 'htmldjango', + 'edge', + 'eelixir', -- vim ft + 'elixir', + 'ejs', + 'erb', + 'eruby', -- vim ft + 'gohtml', + 'gohtmltmpl', + 'haml', + 'handlebars', + 'hbs', + 'html', + 'htmlangular', + 'html-eex', + 'heex', + 'jade', + 'leaf', + 'liquid', + 'markdown', + 'mdx', + 'mustache', + 'njk', + 'nunjucks', + 'php', + 'razor', + 'slim', + 'twig', + -- css + 'css', + 'less', + 'postcss', + 'sass', + 'scss', + 'stylus', + 'sugarss', + -- js + 'javascript', + 'javascriptreact', + 'reason', + 'rescript', + 'typescript', + 'typescriptreact', + -- mixed + 'vue', + 'svelte', + 'templ', + }, + root_markers = { + 'tailwind.config.js' + }, +} diff --git a/vim/.config/nvim/lsp/textlsp.lua b/vim/.config/nvim/lsp/textlsp.lua new file mode 100644 index 0000000..a1dbfc8 --- /dev/null +++ b/vim/.config/nvim/lsp/textlsp.lua @@ -0,0 +1,48 @@ +return { + cmd = {"textlsp"}, -- You may need to provide the full path to textlsp if not in $PATH + filetypes = { "markdown", "org", "latex", "txt", "md", "markdown" }, -- and any other you want as plain text + root_markers = { + ".git", + }, + single_file_support = true, + capabilities = { + textDocument = { + completion = { + editsNearCursor = true, + }, + }, + -- textLSP does not require offsetEncoding, but you may include it for consistency: + offsetEncoding = { "utf-8", "utf-16" }, + }, + settings = { + textLSP = { + analysers = { + languagetool = { + enabled = false, + -- check_text = { + -- on_open = true, + -- on_save = true, + -- on_change = false, + -- }, + }, + ollama = { + enabled = true, + check_text = { + on_open = false, + on_save = true, + on_change = false, + }, + model = "phi3:3.8b-instruct", + max_token = 50, + }, + -- enable and configure other analyzers as desired + }, + documents = { + language = "auto:en", + min_length_language_detect = 20, + org = { org_todo_keywords = { "TODO", "IN_PROGRESS", "DONE" } }, + txt = { parse = true }, + }, + }, + }, +} diff --git a/vim/.config/nvim/lsp/tinymist.lua b/vim/.config/nvim/lsp/tinymist.lua new file mode 100644 index 0000000..eddcd7e --- /dev/null +++ b/vim/.config/nvim/lsp/tinymist.lua @@ -0,0 +1,77 @@ +---@brief +--- +--- https://github.com/Myriad-Dreamin/tinymist +--- An integrated language service for Typst [taɪpst]. You can also call it "微霭" [wēi ǎi] in Chinese. +--- +--- Currently some of Tinymist's workspace commands are supported, namely: +--- `LspTinymistExportSvg`, `LspTinymistExportPng`, `LspTinymistExportPdf +--- `LspTinymistExportMarkdown`, `LspTinymistExportText`, `LspTinymistExportQuery`, +--- `LspTinymistExportAnsiHighlight`, `LspTinymistGetServerInfo`, +--- `LspTinymistGetDocumentTrace`, `LspTinymistGetWorkspaceLabels`, and +--- `LspTinymistGetDocumentMetrics`. + +---@param command_name string +---@param client vim.lsp.Client +---@param bufnr integer +---@return fun():nil run_tinymist_command, string cmd_name, string cmd_desc +local function create_tinymist_command(command_name, client, bufnr) + local export_type = command_name:match 'tinymist%.export(%w+)' + local info_type = command_name:match 'tinymist%.(%w+)' + if info_type and info_type:match '^get' then + info_type = info_type:gsub('^get', 'Get') + end + local cmd_display = export_type or info_type + ---@return nil + local function run_tinymist_command() + local arguments = { vim.api.nvim_buf_get_name(bufnr) } + local title_str = export_type and ('Export ' .. cmd_display) or cmd_display + ---@type lsp.Handler + local function handler(err, res) + if err then + return vim.notify(err.code .. ': ' .. err.message, vim.log.levels.ERROR) + end + -- If exporting, show the string result; else, show the table for inspection + vim.notify(export_type and res or vim.inspect(res), vim.log.levels.INFO) + end + return client:exec_cmd({ + title = title_str, + command = command_name, + arguments = arguments, + }, { bufnr = bufnr }, handler) + end + -- Construct a readable command name/desc + local cmd_name = export_type and ('TinymistExport' .. cmd_display) or ('Tinymist' .. cmd_display) ---@type string + local cmd_desc = export_type and ('Export to ' .. cmd_display) or ('Get ' .. cmd_display) ---@type string + return run_tinymist_command, cmd_name, cmd_desc +end + +---@type vim.lsp.Config +return { + cmd = { 'tinymist' }, + filetypes = { 'typst' }, + root_markers = { '.git', '.jj' }, + on_attach = function(client, bufnr) + for _, command in ipairs { + 'tinymist.exportSvg', + 'tinymist.exportPng', + 'tinymist.exportPdf', + -- 'tinymist.exportHtml', -- Use typst 0.13 + 'tinymist.exportMarkdown', + 'tinymist.exportText', + 'tinymist.exportQuery', + 'tinymist.exportAnsiHighlight', + 'tinymist.getServerInfo', + 'tinymist.getDocumentTrace', + 'tinymist.getWorkspaceLabels', + 'tinymist.getDocumentMetrics', + } do + local cmd_func, cmd_name, cmd_desc = create_tinymist_command(command, client, bufnr) + vim.api.nvim_buf_create_user_command(bufnr, 'Lsp' .. cmd_name, cmd_func, { nargs = 0, desc = cmd_desc }) + end + end, + settings = { + ["tinymist"] = { + formatterMode = "typstyle" + } + } +} diff --git a/vim/.config/nvim/lsp/ty.lua b/vim/.config/nvim/lsp/ty.lua new file mode 100644 index 0000000..92efaa0 --- /dev/null +++ b/vim/.config/nvim/lsp/ty.lua @@ -0,0 +1,14 @@ +---@brief +--- +--- https://github.com/astral-sh/ty +--- +--- A Language Server Protocol implementation for ty, an extremely fast Python type checker and language server, written in Rust. +--- +--- For installation instructions, please refer to the [ty documentation](https://github.com/astral-sh/ty/blob/main/README.md#getting-started). + +---@type vim.lsp.Config +return { + cmd = { 'ty', 'server' }, + filetypes = { 'python' }, + root_markers = { 'ty.toml', 'pyproject.toml', 'setup.py', 'setup.cfg', 'requirements.txt', '.git', '.jj' }, +} diff --git a/vim/.config/nvim/lsp/zigscient.lua b/vim/.config/nvim/lsp/zigscient.lua new file mode 100644 index 0000000..bdb256f --- /dev/null +++ b/vim/.config/nvim/lsp/zigscient.lua @@ -0,0 +1,12 @@ +---@brief +--- https://github.com/zigtools/zls +--- +--- Zig LSP implementation + Zig Language Server + +---@type vim.lsp.Config +return { + cmd = { 'zigscient' }, + filetypes = { 'zig', 'zir' }, + root_markers = { 'zls.json', 'build.zig', '.git', '.jj' }, + workspace_required = false, +} diff --git a/vim/.config/nvim/lsp/zls.lua b/vim/.config/nvim/lsp/zls.lua new file mode 100644 index 0000000..6716521 --- /dev/null +++ b/vim/.config/nvim/lsp/zls.lua @@ -0,0 +1,12 @@ +---@brief +--- https://github.com/zigtools/zls +--- +--- Zig LSP implementation + Zig Language Server + +---@type vim.lsp.Config +return { + cmd = { 'zls' }, + filetypes = { 'zig', 'zir' }, + root_markers = { 'zls.json', 'build.zig', '.git', '.jj' }, + workspace_required = false, +} diff --git a/vim/.config/nvim/lua/custom-lualine.lua b/vim/.config/nvim/lua/custom-lualine.lua new file mode 100644 index 0000000..9bed3a6 --- /dev/null +++ b/vim/.config/nvim/lua/custom-lualine.lua @@ -0,0 +1,4 @@ +require('lualine').setup { + options = { theme = "solarized_dark" } +} + diff --git a/vim/.config/nvim/lua/diagnostics.lua b/vim/.config/nvim/lua/diagnostics.lua new file mode 100644 index 0000000..52f747e --- /dev/null +++ b/vim/.config/nvim/lua/diagnostics.lua @@ -0,0 +1,7 @@ +vim.diagnostic.config({ + virtual_text = true, + signs = true, + underline = true, + update_in_insert = false, +}) + diff --git a/vim/.config/nvim/lua/godot.lua b/vim/.config/nvim/lua/godot.lua new file mode 100644 index 0000000..327ed33 --- /dev/null +++ b/vim/.config/nvim/lua/godot.lua @@ -0,0 +1,60 @@ +local function connect_to_godot_server() + -- Check if project.godot exists in current directory + local project_file = vim.fn.getcwd() .. "/project.godot" + if vim.fn.filereadable(project_file) == 1 then + local pipe_path = vim.fn.getcwd() .. "/nvim_server.pipe" + + -- Create the pipe if it doesn't exist, then connect + local success = vim.fn.serverstart(pipe_path) + if success then + print("Connected to Godot server via " .. pipe_path) + else + print("Failed to create/connect to Godot server pipe: " .. pipe_path) + end + + local dap = require("dap") + + dap.adapters.godot = { + type = 'server', + host = '127.0.0.1', + port = 6006, + } + + dap.configurations.gdscript = { + { + type = 'godot', + request = 'launch', + name = 'Launch scene', + project = '${workspaceFolder}', + launch_scene = true, + }, + } + + dap.configurations.cs = { + { + type = 'godot', + request = 'launch', + name = 'Launch scene', + project = '${workspaceFolder}', + launch_scene = true, + }, + } + end +end + +-- Auto-connect when Neovim starts +vim.api.nvim_create_autocmd("VimEnter", { + callback = connect_to_godot_server, + desc = "Auto-connect to Godot server if project.godot exists" +}) + +-- Optional: Also check when changing directories +vim.api.nvim_create_autocmd("DirChanged", { + callback = connect_to_godot_server, + desc = "Auto-connect to Godot server when changing to Godot project directory" +}) + +-- Optional: Command to manually connect +vim.api.nvim_create_user_command("GodotConnect", connect_to_godot_server, { + desc = "Manually connect to Godot server" +}) diff --git a/vim/.config/nvim/lua/native-lsp.lua b/vim/.config/nvim/lua/native-lsp.lua new file mode 100644 index 0000000..ee97f80 --- /dev/null +++ b/vim/.config/nvim/lua/native-lsp.lua @@ -0,0 +1,114 @@ +vim.lsp.config('luals', { + on_attach = function() + print('luals is now active in this file') + end, +}) +if not string.match(vim.g.hostname, "cs.purdue.edu") then + vim.lsp.enable("luals") +end + + +vim.lsp.config('pyright', { + on_attach = function() + print('pyright is now active in this file') + end, +}) + +vim.lsp.enable("pyright") +-- vim.lsp.enable("basedpyright") + +vim.lsp.config('ty', { + on_attach = function() + print('ty is now active in this file') + end, +}) + +-- vim.lsp.enable("ty") +vim.lsp.enable("ruff") + + + +vim.lsp.config('clangd', { + on_attach = function() + print('clangd is now active in this file') + end, +}) + +vim.lsp.enable("clangd") + +vim.lsp.config('tailwind-ls', { + on_attach = function() + print('tailwind-ls is now active in this file') + end, +}) + +vim.lsp.enable("tailwind-ls") + +vim.lsp.config('zls', { + on_attach = function() + print('zls is now active in this file') + end, +}) + +vim.lsp.enable("zls") +-- vim.lsp.enable("zigscient") + +vim.lsp.enable("gopls") + +vim.lsp.enable("tinymist") + +-- vim.lsp.enable("cspell-ls") + +vim.lsp.enable("astro") + +vim.lsp.config('rust_analyzer', { + on_attach = function() + print('rust-analyzer is now active in this file') + end, +}) + +vim.lsp.enable("rust-analyzer") +vim.lsp.enable("gdscript") +vim.lsp.config('csharp-ls', { + on_attach = function() + print('csharp-ls is now active in this file') + end, +}) + + +vim.lsp.enable("csharp-ls") + +vim.lsp.enable("asm-lsp") +vim.lsp.enable("codebook") +vim.lsp.enable("json") +vim.lsp.enable("eslint") +vim.lsp.enable("css") +vim.lsp.enable("html") +vim.lsp.enable("fish-lsp") + + + +vim.diagnostic.config({ + virtual_text = { priority = 100 }, +}) + +-- https://lsp-zero.netlify.app/blog/lsp-client-features.html + +vim.opt.completeopt = { 'menu', 'menuone', 'noselect', 'noinsert' } +vim.opt.shortmess:append('c') + + +vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("lsp", { clear = true }), + callback = function(args) + vim.api.nvim_create_autocmd("BufWritePre", { + buffer = args.buf, + callback = function() + if vim.bo[args.buf].filetype == "typst" or vim.bo[args.buf].filetype == "c" then + return + end + vim.lsp.buf.format({ async = false, id = args.data.client_id }) + end, + }) + end +}) diff --git a/vim/.config/nvim/lua/packed.lua b/vim/.config/nvim/lua/packed.lua new file mode 100644 index 0000000..28a21cc --- /dev/null +++ b/vim/.config/nvim/lua/packed.lua @@ -0,0 +1,127 @@ +-- +-- Packed: a single file, somewhat compatible Packer replacement +-- Written by grace +-- + +local function resolve_src(s) + if s:match("^https?://") then + return s + end + if s:match("^[%w%-]+/[%w%-_.]+$") then + return "https://github.com/" .. s + end + return s +end + +local function normalize_plugin(p) + if type(p) == "string" then + return { + src = resolve_src(p), + name = p:match(".*/(.*)"), + } + end + + if type(p[1]) == "string" then + p.src = resolve_src(p[1]) + p[1] = nil + end + + if p.src then + p.src = resolve_src(p.src) + end + + if not p.name and p.as then + p.name = p.as + end + + if not p.version then + if p.commit then + p.version = p.commit + elseif p.tag then + p.version = p.tag + elseif p.branch then + p.version = p.branch + end + end + + + + local unsupported = { + 'disable', 'installer', 'updater', 'after', 'rtp', + 'opt', 'bufread', 'lock', 'run', 'requires', 'rocks', 'setup' + } + + for _, field in ipairs(unsupported) do + if p[field] then + vim.notify("Packed does not support `" .. field .. "`: " .. (p.name or p.src), vim.log.levels.WARN) + vim.api.nvim_echo({ { "Press Enter to continue...", "MoreMsg" } }, false, {}) + vim.fn.getchar() + end + end + + if p.cmd or p.ft or p.keys or p.event or p.fn or p.cond or p.module or p.module_pattern then + vim.notify("Packed does not support lazy loading: " .. (p.name or p.src), vim.log.levels.WARN) + vim.api.nvim_echo({ { "Press Enter to continue...", "MoreMsg" } }, false, {}) + vim.fn.getchar() + end + + + + return p +end + +local function setup_plugins(plugs) + local plugins = {} + + if type(plugs) == "function" then + local function use(p) + table.insert(plugins, p) + end + + plugs(use) + else + plugins = plugs + end + local specs = {} + + for _, p in ipairs(plugins) do + p = normalize_plugin(p) + + local spec = vim.deepcopy(p) + spec.config = nil + + table.insert(specs, spec) + end + + vim.pack.add(specs, { confirm = true, load = true }) + + + for _, p in ipairs(plugins) do + if type(p) ~= "string" and p.config then + local ok = pcall(p.config) + if not ok then + vim.notify("Config failed: " .. (p.name or p.src), vim.log.levels.ERROR) + vim.api.nvim_echo({ { "Press Enter to continue...", "MoreMsg" } }, false, {}) + vim.fn.getchar() + end + end + end + + + local unused = vim.iter(vim.pack.get()) + :filter(function(p) + return not p.active + end) + :map(function(p) + return p.spec.name + end) + :totable() + + vim.pack.del(unused) +end + + +local r = {} +r.setup = setup_plugins + +return r diff --git a/vim/.config/nvim/lua/plugins.lua b/vim/.config/nvim/lua/plugins.lua new file mode 100644 index 0000000..303177d --- /dev/null +++ b/vim/.config/nvim/lua/plugins.lua @@ -0,0 +1,421 @@ +-- vim.pack.update(nil, { target = 'lockfile' }) + +return require("packed").setup(function(use) + use 'nvim-lua/plenary.nvim' + use { + 'nvim-telescope/telescope.nvim', + config = function() + require('telescope').setup({ + defaults = { + vimgrep_arguments = { + "rg", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case", + "--hidden", + "--glob=!.git/*", + "--glob=!node_modules/**", + "--glob=!build/**", + }, + file_ignore_patterns = { "node_modules", "^build/", "^.git/" }, + }, + pickers = { + find_files = { + hidden = true, + } + } + }) + end, + } + + -- https://tduyng.com/blog/neovim-highlight-syntax/ + use { + 'nvim-treesitter/nvim-treesitter', + branch = 'main', + config = function() + local parser_path = vim.fn.expand("~/.local/share/nvim/site/parser") + vim.opt.runtimepath:append(parser_path) + + require("nvim-treesitter").setup({}) + require("nvim-treesitter").install({ + "bash", + "blade", + "c", + "comment", + "css", + "diff", + "dockerfile", + "fish", + "gitcommit", + "gitignore", + "go", + "gomod", + "gosum", + "gowork", + "html", + "ini", + "javascript", + "jsdoc", + "json", + "lua", + "luadoc", + "luap", + "make", + "markdown", + "markdown_inline", + "nginx", + "nix", + "proto", + "python", + "query", + "regex", + "rust", + "scss", + "sql", + "terraform", + "toml", + "tsx", + "typescript", + "vim", + "vimdoc", + "xml", + "yaml", + "zig", + }) + + vim.api.nvim_create_autocmd("PackChanged", { + desc = "Handle nvim-treesitter updates", + group = vim.api.nvim_create_augroup("nvim-treesitter-pack-changed-update-handler", { clear = true }), + callback = function(event) + if event.data.kind == "update" then + local ok = pcall(vim.cmd, "TSUpdate") + if ok then + vim.notify("TSUpdate completed successfully!", vim.log.levels.INFO) + else + vim.notify("TSUpdate command not available yet, skipping", vim.log.levels.WARN) + end + end + end, + }) + + vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()" + vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + + vim.api.nvim_create_autocmd("FileType", { + pattern = { "*" }, + callback = function() + local filetype = vim.bo.filetype + if filetype and filetype ~= "" then + local success = pcall(function() + vim.treesitter.start() + end) + if not success then + return + end + end + end, + }) + end + } + + use { + src = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects", + version = "main", + config = function() + require("nvim-treesitter-textobjects").setup({ + select = { + enable = true, + lookahead = true, + selection_modes = { + ["@parameter.outer"] = "v", -- charwise + ["@function.outer"] = "V", -- linewise + ["@class.outer"] = "<c-v>", -- blockwise + }, + include_surrounding_whitespace = false, + }, + move = { + enable = true, + set_jumps = true, + }, + }) + + -- SELECT keymaps + local sel = require("nvim-treesitter-textobjects.select") + for _, map in ipairs({ + { { "x", "o" }, "af", "@function.outer" }, + { { "x", "o" }, "if", "@function.inner" }, + { { "x", "o" }, "ac", "@class.outer" }, + { { "x", "o" }, "ic", "@class.inner" }, + { { "x", "o" }, "aa", "@parameter.outer" }, + { { "x", "o" }, "ia", "@parameter.inner" }, + { { "x", "o" }, "ad", "@comment.outer" }, + { { "x", "o" }, "as", "@statement.outer" }, + }) do + vim.keymap.set(map[1], map[2], function() + sel.select_textobject(map[3], "textobjects") + end, { desc = "Select " .. map[3] }) + end + + -- MOVE keymaps + local mv = require("nvim-treesitter-textobjects.move") + for _, map in ipairs({ + { { "n", "x", "o" }, "]]", mv.goto_next_start, "@function.outer" }, + { { "n", "x", "o" }, "[[", mv.goto_previous_start, "@function.outer" }, + { { "n", "x", "o" }, "]f", mv.goto_next_start, "@function.outer" }, + { { "n", "x", "o" }, "[f", mv.goto_previous_start, "@function.outer" }, + { { "n", "x", "o" }, "]c", mv.goto_next_start, "@class.outer" }, + { { "n", "x", "o" }, "[c", mv.goto_previous_start, "@class.outer" }, + { { "n", "x", "o" }, "]F", mv.goto_next_end, "@function.outer" }, + { { "n", "x", "o" }, "[F", mv.goto_previous_end, "@function.outer" }, + { { "n", "x", "o" }, "]o", mv.goto_next_start, { "@loop.inner", "@loop.outer" } }, + { { "n", "x", "o" }, "[o", mv.goto_previous_start, { "@loop.inner", "@loop.outer" } }, + }) do + local modes, lhs, fn, query = map[1], map[2], map[3], map[4] + -- build a human-readable desc + local qstr = (type(query) == "table") and table.concat(query, ",") or query + vim.keymap.set(modes, lhs, function() + fn(query, "textobjects") + end, { desc = "Move to " .. qstr }) + end + end + } + + + + use 'mbbill/undotree' + use 'nvim-tree/nvim-web-devicons' + use 'mfussenegger/nvim-lint' + + -- grrr why does neovim not have this? + use { + "windwp/nvim-autopairs", + config = function() + require("nvim-autopairs").setup {} + end + } + + use { "akinsho/toggleterm.nvim", config = function() + require("toggleterm").setup { + size = 30 + } + vim.keymap.set({ "n", "t", "v" }, "<leader>tt", require("toggleterm").toggle, { desc = "Toggle terminal" }) + end } + use { 'nvim-telescope/telescope.nvim' } + if vim.g.hostname == "turing" then + use { + 'anurag3301/nvim-platformio.lua', + config = function() + require('platformio').setup({ + lsp = "ccls" --default: ccls, other option: clangd + -- If you pick clangd, it also creates compile_commands.json + }) + end + } + end + + use { + "chentoast/marks.nvim", + config = function() require('marks').setup() end + } + + -- use { "MunifTanjim/nui.nvim" } + + use { 'rafamadriz/friendly-snippets' } + use { + 'saghen/blink.cmp', + version = 'v1.10.1', + config = function() + require("blink.cmp").setup({ + fuzzy = { + implementation = "prefer_rust_with_warning", + prebuilt_binaries = { + download = true, + force_version = "v1.*" + }, + }, + keymap = { preset = "enter" }, + }) + end + } + + use { + 'f-person/git-blame.nvim', + config = function() + require("gitblame").setup { + gitblame_delay = 1 + } + end + } + + + use { + "mfussenegger/nvim-dap", + + config = function() + local dap = require("dap") + + -- require('dap.ext.vscode').load_launchjs(nil, { + -- node = { 'javascript', 'typescript' }, + -- python = { 'python' }, + -- go = { 'go' }, + -- codelldb = { 'c', 'cpp', 'rust' } + -- }) + + vim.keymap.set('n', '<M-u>', function() dap.continue() end, { desc = 'DAP: Continue' }) + vim.keymap.set('n', '<M-i>', function() dap.step_into() end, { desc = 'DAP: Step Into' }) + vim.keymap.set('n', '<M-o>', function() dap.step_out() end, { desc = 'DAP: Step Out' }) + vim.keymap.set('n', '<M-p>', function() dap.step_over() end, { desc = 'DAP: Step Over' }) + vim.keymap.set('n', '<M-b>', function() dap.toggle_breakpoint() end, { desc = 'DAP: Toggle Breakpoint' }) + vim.keymap.set('n', '<F5>', function() dap.continue() end) + vim.keymap.set('n', '<F10>', function() dap.step_over() end) + vim.keymap.set('n', '<F11>', function() dap.step_into() end) + vim.keymap.set('n', '<F12>', function() dap.step_out() end) + vim.keymap.set('n', '<Leader>b', function() dap.toggle_breakpoint() end) + vim.keymap.set('n', '<Leader>dr', function() dap.repl.open() end) + + dap.adapters.codelldb = { + type = "executable", + command = "codelldb" + } + dap.configurations.cpp = { + { + name = "Launch file", + type = "codelldb", + request = "launch", + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + end, + cwd = '${workspaceFolder}', + stopOnEntry = false, + }, + } + end + } + + + use { + 'stevearc/overseer.nvim', + config = function() require('overseer').setup() end + } + use 'theHamsta/nvim-dap-virtual-text' + use "nvim-neotest/nvim-nio" + use { + "rcarriga/nvim-dap-ui", + config = function() + local dap, dapui = require("dap"), require("dapui") + dapui.setup() + dap.listeners.before.attach.dapui_config = function() + dapui.open() + end + dap.listeners.before.launch.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 + } + + use { "geigerzaehler/tree-sitter-jinja2" } + + use { + "rose-pine/neovim", + as = "rose-pine", + config = function() + require("rose-pine").setup({ + variant = "moon" + }) + vim.cmd("colorscheme rose-pine") + end + } + + use { + 'chomosuke/typst-preview.nvim', + config = function() + require 'typst-preview'.setup {} + end, + } + + + use({ + "iamcco/markdown-preview.nvim", + config = function() + vim.api.nvim_create_user_command("MDPreviewInstall", function() + vim.vim.fn["mkdp#util#install"]() + end, {}) + end, + }) + + + use { + 'LukasPietzschmann/telescope-tabs', + config = function() + require 'telescope-tabs'.setup { + -- Your custom config :^) + } + end + } + use "HiPhish/rainbow-delimiters.nvim" + + use { + 'diogo464/hotreload.nvim', + config = function() + require('hotreload').setup({ + interval = 500, + }) + end + } + + use { + "lukas-reineke/indent-blankline.nvim", + config = function() + require("ibl").setup { + indent = { highlight = { "Comment" }, char = "▏" }, + scope = { highlight = { "@variable" }, show_start = false, show_end = false }, + } + end + } + + use { + "https://tangled.org/bpavuk.neocities.org/jj-log.nvim.git", + config = function() + require('jj-log').setup { + out_waiting = "...", + out_no_jj_repo = "~no_jj_repo~", + out_no_desc = "~no_desc~", + max_desc_length = 47, + full_desc = false, + } + end + } + + use { + 'nvim-lualine/lualine.nvim', + config = function() + require('lualine').setup { + options = { theme = "rose-pine" }, + sections = { + lualine_a = {'mode'}, + lualine_b = { + function() + return vim.b.jj_desc or "~no desc~" + end, + 'diff', + 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + } + end + } + + ------------------------ +end) diff --git a/vim/.config/nvim/lua/remap.lua b/vim/.config/nvim/lua/remap.lua new file mode 100644 index 0000000..0128949 --- /dev/null +++ b/vim/.config/nvim/lua/remap.lua @@ -0,0 +1,74 @@ +vim.g.mapleader = "\\" +vim.keymap.set("n", "<leader>\\", ":nohlsearch<CR>") + +vim.keymap.set("n", "<leader>vv", function() vim.cmd("vsplit") end) +vim.keymap.set("n", "<leader>vt", function() vim.cmd("tabnew") end) +vim.keymap.set("n", "<leader>vw", function() vim.cmd("tabclose") end) +vim.keymap.set("n", "<leader>vW", function() vim.cmd("tabonly") end) +vim.keymap.set("n", "<leader>vf", function() require('telescope-tabs').list_tabs() end) +vim.keymap.set("n", "<C-j>", function() vim.cmd("tabnext") end) +vim.keymap.set("n", "<C-k>", function() vim.cmd("tabNext") end) +vim.keymap.set("n", "<leader>v1", function() vim.cmd("tabnext 1") end) +vim.keymap.set("n", "<leader>v2", function() vim.cmd("tabnext 2") end) +vim.keymap.set("n", "<leader>v3", function() vim.cmd("tabnext 3") end) +vim.keymap.set("n", "<leader>v4", function() vim.cmd("tabnext 4") end) +vim.keymap.set("n", "<leader>v5", function() vim.cmd("tabnext 5") end) +vim.keymap.set("n", "<leader>v6", function() vim.cmd("tabnext 6") end) +vim.keymap.set("n", "<leader>v7", function() vim.cmd("tabnext 7") end) +vim.keymap.set("n", "<leader>v8", function() vim.cmd("tabnext 8") end) +vim.keymap.set("n", "<leader>v9", function() vim.cmd("tabnext 9") end) + + + +-- easier to move windows +vim.keymap.set("n", "`h", "<C-w>h") +vim.keymap.set("n", "`j", "<C-w>j") +vim.keymap.set("n", "`k", "<C-w>k") +vim.keymap.set("n", "`l", "<C-w>l") + +vim.keymap.set("n", "<leader>qr", vim.lsp.buf.rename) +vim.keymap.set("n", "<leader>qf", vim.lsp.buf.format) +vim.keymap.set("n", "<leader>dd", vim.diagnostic.open_float) + + +vim.keymap.set("n", "yf", function() + local view = vim.fn.winsaveview() + vim.cmd("%y") + vim.fn.winrestview(view) +end, { desc = "Yank entire file" }) + + +-------- PLUGINS ------- + +-- Telescope +local ts_builtins = require('telescope.builtin') +vim.keymap.set('n', '<leader>ff', ts_builtins.find_files, { desc = 'Telescope find files' }) +vim.keymap.set('n', '<leader>fg', ts_builtins.git_files, { desc = 'Telescope find git files' }) +vim.keymap.set('n', '<leader>fb', ts_builtins.buffers, { desc = 'Telescope buffers' }) +vim.keymap.set('n', '<leader>fh', ts_builtins.help_tags, { desc = 'Telescope help tags' }) +vim.keymap.set('n', '<leader>fs', ts_builtins.lsp_workspace_symbols, { desc = 'Telescope find symbols' }) +vim.keymap.set('n', '<leader>fts', ts_builtins.treesitter, { desc = 'Telescope find treesitter' }) +vim.keymap.set('n', '<leader>fd', ts_builtins.lsp_definitions, { desc = 'Telescope find definition' }) +vim.keymap.set('n', '<leader>ftd', ts_builtins.lsp_type_definitions, { desc = 'Telescope find type definition' }) +vim.keymap.set('n', '<leader>fr', ts_builtins.lsp_references, { desc = 'Telescope find references' }) + +-- Undo Tree +vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle) + +-- Better Term + +-- local betterTerm = require('betterTerm') +-- -- toggle firts term +-- vim.keymap.set({ "n", "t" }, "<leader>tt", betterTerm.open, { desc = "Open terminal" }) +-- -- Select term focus +-- -- vim.keymap.set({"n"}, "<leader>tf", betterTerm.select, { desc = "Select terminal"}) +-- -- Create new term +-- local current = 2 +-- vim.keymap.set( +-- { "n" }, "<leader>tn", +-- function() +-- betterTerm.open(current) +-- current = current + 1 +-- end, +-- { desc = "New terminal" } +-- ) diff --git a/vim/.config/nvim/lua/standard-lint.lua b/vim/.config/nvim/lua/standard-lint.lua new file mode 100644 index 0000000..2f06ce5 --- /dev/null +++ b/vim/.config/nvim/lua/standard-lint.lua @@ -0,0 +1,11 @@ +vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave", "TextChanged" }, { + callback = function() + -- try_lint without arguments runs the linters defined in `linters_by_ft` + -- for the current filetype + require("lint").try_lint(nil, { ignore_errors = true }) + + -- You can call `try_lint` with a linter name or a list of names to always + -- run specific linters, independent of the `linters_by_ft` configuration + -- require("lint").try_lint("cspell") + end, +}) diff --git a/vim/.config/nvim/lua/westwood-lint.lua b/vim/.config/nvim/lua/westwood-lint.lua new file mode 100644 index 0000000..04501b2 --- /dev/null +++ b/vim/.config/nvim/lua/westwood-lint.lua @@ -0,0 +1,21 @@ +local lint = require("lint") + +local errorformat = +"%WWARNING: %m,%Z%\\s%\\s%\\s%\\s%\\s%\\s%\\s%\\s%\\sat (stdin) from line %l column %c to line %e column %k" +lint.linters.westwood = { + cmd = '/homes/kkasad/share/westwood', + stdin = true, + args = { '-f', 'machine', '-' }, + stream = both, + ignore_exitcode = false, + env = nil, + parser = require('lint.parser').from_errorformat(errorformat) +} + +lint.linters_by_ft.c = { "westwood", "clangtidy" } +lint.linters_by_ft.cpp = { "westwood" } +vim.list_extend(lint.linters_by_ft.c, { "westwood", "clangtidy" }) +vim.list_extend(lint.linters_by_ft.cpp, { "westwood" }) + +local ns = lint.get_namespace("westwood") +vim.diagnostic.config({ virtual_text = true }, ns) diff --git a/vim/.config/nvim/nvim-pack-lock.json b/vim/.config/nvim/nvim-pack-lock.json new file mode 100644 index 0000000..d89884f --- /dev/null +++ b/vim/.config/nvim/nvim-pack-lock.json @@ -0,0 +1,119 @@ +{ + "plugins": { + "blink.cmp": { + "rev": "451168851e8e2466bc97ee3e026c3dcb9141ce07", + "src": "https://github.com/saghen/blink.cmp", + "version": "'v1.10.1'" + }, + "friendly-snippets": { + "rev": "6cd7280adead7f586db6fccbd15d2cac7e2188b9", + "src": "https://github.com/rafamadriz/friendly-snippets" + }, + "git-blame.nvim": { + "rev": "5c536e2d4134d064aa3f41575280bc8a2a0e03d7", + "src": "https://github.com/f-person/git-blame.nvim" + }, + "hotreload.nvim": { + "rev": "76f1c8bd1afaa13a22756c736478144fa38f75f8", + "src": "https://github.com/diogo464/hotreload.nvim" + }, + "indent-blankline.nvim": { + "rev": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03", + "src": "https://github.com/lukas-reineke/indent-blankline.nvim" + }, + "jj-log.nvim": { + "rev": "e4866fed19173eb044196207c51093e203332b01", + "src": "https://tangled.org/bpavuk.neocities.org/jj-log.nvim.git" + }, + "lualine.nvim": { + "rev": "47f91c416daef12db467145e16bed5bbfe00add8", + "src": "https://github.com/nvim-lualine/lualine.nvim" + }, + "markdown-preview.nvim": { + "rev": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee", + "src": "https://github.com/iamcco/markdown-preview.nvim" + }, + "marks.nvim": { + "rev": "f353e8c08c50f39e99a9ed474172df7eddd89b72", + "src": "https://github.com/chentoast/marks.nvim" + }, + "nvim-autopairs": { + "rev": "59bce2eef357189c3305e25bc6dd2d138c1683f5", + "src": "https://github.com/windwp/nvim-autopairs" + }, + "nvim-dap": { + "rev": "a9d8cb68ee7184111dc66156c4a2ebabfbe01bc5", + "src": "https://github.com/mfussenegger/nvim-dap" + }, + "nvim-dap-ui": { + "rev": "f5b6673f374626515401c5bc51b005f784a4f252", + "src": "https://github.com/rcarriga/nvim-dap-ui" + }, + "nvim-dap-virtual-text": { + "rev": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6", + "src": "https://github.com/theHamsta/nvim-dap-virtual-text" + }, + "nvim-lint": { + "rev": "606b823a57b027502a9ae00978ebf4f5d5158098", + "src": "https://github.com/mfussenegger/nvim-lint" + }, + "nvim-nio": { + "rev": "21f5324bfac14e22ba26553caf69ec76ae8a7662", + "src": "https://github.com/nvim-neotest/nvim-nio" + }, + "nvim-treesitter": { + "rev": "6620ae1c44dfa8623b22d0cbf873a9e8d073b849", + "src": "https://github.com/nvim-treesitter/nvim-treesitter", + "version": "'main'" + }, + "nvim-treesitter-textobjects": { + "rev": "93d60a475f0b08a8eceb99255863977d3a25f310", + "src": "https://github.com/nvim-treesitter/nvim-treesitter-textobjects", + "version": "'main'" + }, + "nvim-web-devicons": { + "rev": "d7462543c9e366c0d196c7f67a945eaaf5d99414", + "src": "https://github.com/nvim-tree/nvim-web-devicons" + }, + "overseer.nvim": { + "rev": "a2194447f4c5a1baf95139c5c7b539fa7b0d012f", + "src": "https://github.com/stevearc/overseer.nvim" + }, + "plenary.nvim": { + "rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509", + "src": "https://github.com/nvim-lua/plenary.nvim" + }, + "rainbow-delimiters.nvim": { + "rev": "607a438d8c647a355749973fd295e33505afafde", + "src": "https://github.com/HiPhish/rainbow-delimiters.nvim" + }, + "rose-pine": { + "rev": "cf2a288696b03d0934da713d66c6d71557b5c997", + "src": "https://github.com/rose-pine/neovim" + }, + "telescope-tabs": { + "rev": "777b1f630f3d6a12a2e71635a82581c988d6da2e", + "src": "https://github.com/LukasPietzschmann/telescope-tabs" + }, + "telescope.nvim": { + "rev": "5255aa27c422de944791318024167ad5d40aad20", + "src": "https://github.com/nvim-telescope/telescope.nvim" + }, + "toggleterm.nvim": { + "rev": "9a88eae817ef395952e08650b3283726786fb5fb", + "src": "https://github.com/akinsho/toggleterm.nvim" + }, + "tree-sitter-jinja2": { + "rev": "ecab6215c53da5c1126d81d1bf664b3b5cf87d15", + "src": "https://github.com/geigerzaehler/tree-sitter-jinja2" + }, + "typst-preview.nvim": { + "rev": "a42c86ef1875100c2be92e90a637064efb0eab06", + "src": "https://github.com/chomosuke/typst-preview.nvim" + }, + "undotree": { + "rev": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d", + "src": "https://github.com/mbbill/undotree" + } + } +} |
