Compare commits

..

No commits in common. "786cbc90d812d8fb64cb1be8790928f9d4e30707" and "82e70e57fee5832b7ee2a8d8af05916d9e79fe44" have entirely different histories.

11 changed files with 94 additions and 142 deletions

View File

@ -51,7 +51,6 @@
"overseer.nvim": { "branch": "master", "commit": "c416be50c2715a7f631d67e21154b8e6cd873ca3" },
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
"render-markdown.nvim": { "branch": "main", "commit": "fc05fb7c56795f191b6800799a2ec6ea325ba715" },
"rustaceanvim": { "branch": "master", "commit": "7405d2d84ce96e460d548cf7e8def332ac6e19f0" },
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" },
@ -69,7 +68,5 @@
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
"vim-lastplace": { "branch": "master", "commit": "e58cb0df716d3c88605ae49db5c4741db8b48aa9" },
"vim-merginal": { "branch": "develop", "commit": "3dca10fd8bce10edbc2024651db4ffb6dd2d89de" },
"vim-processing": { "branch": "master", "commit": "91aaa18a54f8e507e48353ba87b1eb4ecd82a17c" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }
}

View File

@ -11,7 +11,11 @@ vim.keymap.set("n", "<leader>q", vim.diagnostic.setqflist, { desc = "Open diagno
-- Open terminal in current window
vim.keymap.del("n", "<C-/>")
vim.keymap.set({ "n", "v" }, "<leader>to", "<cmd>term<cr>", { desc = "[T]erminal [O]pen" })
vim.keymap.del("n", "<leader>ft")
vim.keymap.del("n", "<leader>fT")
vim.keymap.set({ "n", "v" }, "<leader>to", function()
LazyVim.terminal()
end, { desc = "[T]erminal [O]pen" })
-- Disable arrow keys in normal mode
vim.keymap.set({ "n", "v" }, "<left>", '<cmd>echo "Use h to move!!"<CR>')

View File

@ -11,15 +11,9 @@ vim.g.base_dir = vim.fn.getcwd()
-- Set display language
vim.cmd("silent! language en_US")
-- Sets the shell to use for system() and ! commands in windows and wsl
-- Detect and use PowerShell on Windows
if vim.fn.has("win32") == 1 or vim.fn.has("wsl") == 1 then
vim.opt.shell = vim.fn.executable("pwsh.exe") == 1 and "pwsh.exe" or "powershell.exe"
vim.opt.shellcmdflag =
"-NoLogo -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;"
vim.opt.shellredir = "-RedirectStandardOutput %s -NoNewWindow -Wait"
vim.opt.shellpipe = "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode"
vim.opt.shellxquote = ""
vim.opt.shellquote = ""
LazyVim.terminal.setup("pwsh")
end
-- Indenting

View File

@ -2,6 +2,8 @@ return {
-- add catppuccin
{
"catppuccin/nvim",
lazy = true,
name = "catppuccin",
opts = {
integrations = {
cmp = true,

View File

@ -6,5 +6,4 @@ return {
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
{ "folke/persistence.nvim", enabled = false },
{ "jesseduffield/lazygit", enabled = false },
{ "folke/flash.nvim", enabled = false },
}

View File

@ -1,6 +1,11 @@
return {
{
"williamboman/mason.nvim",
cmd = "Mason",
keys = { { "<leader>cm", "<cmd>Mason<cr>", desc = "Mason" } },
build = ":MasonUpdate",
opts_extend = { "ensure_installed" },
opts = {
ensure_installed = {
"eslint_d",
@ -10,5 +15,28 @@ return {
"powershell-editor-services",
},
},
---@param opts MasonSettings | {ensure_installed: string[]}
config = function(_, opts)
require("mason").setup(opts)
local mr = require("mason-registry")
mr:on("package:install:success", function()
vim.defer_fn(function()
-- trigger FileType event to possibly load this newly installed LSP server
require("lazy.core.handler.event").trigger({
event = "FileType",
buf = vim.api.nvim_get_current_buf(),
})
end, 100)
end)
mr.refresh(function()
for _, tool in ipairs(opts.ensure_installed) do
local p = mr.get_package(tool)
if not p:is_installed() then
p:install()
end
end
end)
end,
},
}

View File

@ -1,120 +0,0 @@
return {
{
"mfussenegger/nvim-jdtls",
opts = function()
local mason_registry = require("mason-registry")
local lombok_jar = mason_registry.get_package("jdtls"):get_install_path() .. "/lombok.jar"
return {
-- How to find the root dir for a given filename. The default comes from
-- lspconfig which provides a function specifically for java projects.
root_dir = LazyVim.lsp.get_raw_config("jdtls").default_config.root_dir,
-- How to find the project name for a given root dir.
project_name = function(root_dir)
return root_dir and vim.fs.basename(root_dir)
end,
-- Where are the config and workspace dirs for a project?
jdtls_config_dir = function(project_name)
return vim.fn.stdpath("cache") .. "/jdtls/" .. project_name .. "/config"
end,
jdtls_workspace_dir = function(project_name)
return vim.fn.stdpath("cache") .. "/jdtls/" .. project_name .. "/workspace"
end,
-- How to run jdtls. This can be overridden to a full java command-line
-- if the Python wrapper script doesn't suffice.
cmd = {
vim.fn.exepath("jdtls"),
string.format("--jvm-arg=-javaagent:%s", lombok_jar),
},
full_cmd = function(opts)
local fname = vim.api.nvim_buf_get_name(0)
local root_dir = opts.root_dir(fname)
local project_name = opts.project_name(root_dir)
local cmd = vim.deepcopy(opts.cmd)
if project_name then
vim.list_extend(cmd, {
"-configuration",
opts.jdtls_config_dir(project_name),
"-data",
opts.jdtls_workspace_dir(project_name),
})
end
return cmd
end,
-- These depend on nvim-dap, but can additionally be disabled by setting false here.
dap = { hotcodereplace = "auto", config_overrides = {} },
dap_main = {},
test = true,
settings = {
java = {
project = (function()
-- START SEARCH FOR PROCESSING --
-- detect install path based on system
local is_windows = vim.fn.has("win32") == 1
local cmds = is_windows and {
"(gcm processing.exe).source",
} or {
"whereis",
"processing.exe",
}
-- run syscall and process output
local output = vim.system(cmds, { text = true }):wait()
local path = output.stdout or ""
if not is_windows then
-- on linux, get substr starting with path
local start_idx = string.find(path, "/")
path = (start_idx ~= nil) and string.sub(path, start_idx) or ""
end
-- for windows, remove backslashes
path = string.gsub(path, "\\", "/")
-- remove filename at end of path
local end_idx = string.find(path, "/[^/]*$")
path = string.sub(path, 1, end_idx)
-- in case of chocolatey install, navigate to binaries
local is_chocolatey = string.find(path, "chocolatey")
if is_chocolatey then
path = path .. "../lib/processing/tools/"
-- list directories for program version
cmds = is_windows
and {
"ls",
path,
"|select name",
"|Out-String",
}
or {
"ls",
"-l",
path,
}
output = vim.system(cmds, { text = true }):wait()
local version = string.match(output.stdout, "processing[^%s]*")
path = path .. version
end
-- set path to processing-core library
path = path .. "/core/library/core.jar"
return {
referencedLibraries = {
is_windows and string.gsub(path, "/", "\\") or path,
},
}
end)(),
inlayHints = {
parameterNames = {
enabled = "all",
},
},
},
},
}
end,
},
}

View File

@ -1,3 +0,0 @@
return {
{ "andweeb/presence.nvim" },
}

View File

@ -1,6 +1,20 @@
return {
{
"nvim-treesitter/nvim-treesitter",
version = false, -- last release is way too old and doesn't work on Windows
build = ":TSUpdate",
event = { "LazyFile", "VeryLazy" },
lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline
init = function(plugin)
-- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early
-- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which
-- no longer trigger the **nvim-treesitter** module to be loaded in time.
-- Luckily, the only things that those plugins need are the custom queries, which we make available
-- during startup.
require("lazy.core.loader").add_to_rtp(plugin)
require("nvim-treesitter.query_predicates")
end,
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
keys = {
{ "<c-space>", desc = "Increment Selection" },
{ "<bs>", desc = "Decrement Selection", mode = "x" },
@ -10,7 +24,34 @@ return {
---@diagnostic disable-next-line: missing-fields
opts = {
auto_install = true,
highlight = { enable = true },
indent = { enable = true },
ensure_installed = {
"bash",
"c",
"diff",
"html",
"javascript",
"jsdoc",
"json",
"jsonc",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"printf",
"python",
"query",
"regex",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"xml",
"yaml",
-- other
"svelte",
"php",
"rust",
@ -20,6 +61,15 @@ return {
"gitcommit",
"gitignore",
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
textobjects = {
select = {
enable = true,
@ -65,5 +115,12 @@ return {
},
},
},
---@param opts TSConfig
config = function(_, opts)
if type(opts.ensure_installed) == "table" then
opts.ensure_installed = LazyVim.dedup(opts.ensure_installed)
end
require("nvim-treesitter.configs").setup(opts)
end,
},
}

View File

@ -1,3 +0,0 @@
return {
{ "sophacles/vim-processing" },
}

View File

@ -1,3 +0,0 @@
return {
{ "tpope/vim-sleuth" },
}