update
This commit is contained in:
parent
1210ef507b
commit
9c7437d6ad
8 changed files with 174 additions and 41 deletions
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,24 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" },
|
||||
"LuaSnip": { "branch": "master", "commit": "82108e7e31cc6fc223cc5df5cae6d89f70bb199f" },
|
||||
"bufresize.nvim": { "branch": "master", "commit": "3b19527ab936d6910484dcc20fb59bdb12322d8b" },
|
||||
"cellular-automaton.nvim": { "branch": "main", "commit": "b7d056dab963b5d3f2c560d92937cb51db61cb5b" },
|
||||
"cloak.nvim": { "branch": "main", "commit": "951b163e55ce7639eb320c450bde9283c4fe968b" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||
"conform.nvim": { "branch": "master", "commit": "c4b2efb8aee4af0ef179a9b49ba401de3c4ef5d2" },
|
||||
"copilot.vim": { "branch": "release", "commit": "5b19fb001d7f31c4c7c5556d7a97b243bd29f45f" },
|
||||
"conform.nvim": { "branch": "master", "commit": "75e7c5c7eb5fbd53f8b12dc420b31ec70770b231" },
|
||||
"copilot.vim": { "branch": "release", "commit": "1a55183ef9347d6f420406a3746474b6b9fb9ef5" },
|
||||
"everforest": { "branch": "main", "commit": "06a600c4fa49e7a4c44848d14c353ecbaab8eb9f" },
|
||||
"focus.nvim": { "branch": "master", "commit": "c83be53de558f6f0824c8cefcad61719c87ce157" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "3e6e91b09f0468c32d3b96dcacf4b947f037ce25" },
|
||||
"glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
|
||||
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
|
||||
"image.nvim": { "branch": "master", "commit": "2090055394d5c8efb5f23143cc2f3d9fac68a61e" },
|
||||
"image.nvim": { "branch": "master", "commit": "245422e5c4774f0640d41c0eadec77396f2be4a9" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "3c8a185da4b8ab7aef487219f5e001b11d4b6aaf" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
||||
"lsp-zero.nvim": { "branch": "v3.x", "commit": "2def059b9d7c45fddc9c072835710ca9a498657c" },
|
||||
"lsp-zero.nvim": { "branch": "v3.x", "commit": "433db11e818d07a5151e2c750ca8f09cc2aa3146" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" },
|
||||
"mason.nvim": { "branch": "main", "commit": "a09da6ac634926a299dd439da08bdb547a8ca011" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "0989bdf4fdf7b5aa4c74131d7ffccc3f399ac788" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "8b70e7f1e0a4119c1234c3bde4a01c241cabcc74" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e110bc3be1a7309617cecd77bfe4bf86ba1b8134" },
|
||||
"meh": { "branch": "master", "commit": "e2962284bbd53db5cbe2db39efaa3ea74ade0fb1" },
|
||||
"mini.bufremove": { "branch": "main", "commit": "020243bfed8c8b941f2c20626faf3ea39c0c0e1b" },
|
||||
"mini.comment": { "branch": "main", "commit": "67f00d3ebbeae15e84584d971d0c32aad4f4f3a4" },
|
||||
|
|
@ -26,27 +27,28 @@
|
|||
"nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" },
|
||||
"nvim-bqf": { "branch": "main", "commit": "bdc2a4e5bb670b3c0e33ada9c0eec636d93a0748" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ce0e625df61be77abe1340fbc9afe9ad39b31dd8" },
|
||||
"nvim-lint": { "branch": "master", "commit": "8df53b5dde8ea80f0a039775777eae6648a10229" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "796394fd19fb878e8dbc4fd1e9c9c186ed07a5f4" },
|
||||
"nvim-spectre": { "branch": "master", "commit": "d8906855f1949ac97b1e77aaf8d3fe12ed158ddc" },
|
||||
"nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "8ae4080c5ba59d81b4e49525d4168807bc098e73" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "652ec514d6ba8bc4a3c2de76c855fe668e2c7196" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "8cd2b230174efbf7b5d9f49fe2f90bda6b5eb16e" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "400a99ad43ac78af1148061da3491cba2637ad29" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "85b9d0cbd4ff901abcda862b50dbb34e0901848b" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "3e24abe1ae66532135cec911562f553fe247cb56" },
|
||||
"oil.nvim": { "branch": "master", "commit": "a128e6f75c6a71b7b9ac7ea663949a5209771cd5" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "db0c864375c198cacc171ff373e76bfce2a85045" },
|
||||
"oil.nvim": { "branch": "master", "commit": "c4cc8240f1c71defcb67c45da96e44b968d29e5f" },
|
||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
||||
"rasmus": { "branch": "main", "commit": "f824de95d446686e479781c0c2b778c177da528f" },
|
||||
"readline.nvim": { "branch": "main", "commit": "5cb27349bc01cdcdb3d3494e5337d8b3834aef1a" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "258041a596d733dc51f6ad1e092ed1f23e3faa70" },
|
||||
"rose-pine": { "branch": "main", "commit": "92762f4fa2144c05db760ea254f4c399a56a7ef5" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "403ad1a4fd7eb39388690a5657e7cbfb16da6668" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "c067e44b8171494fc1b5206ab4c267cd74c043b1" },
|
||||
"rose-pine": { "branch": "main", "commit": "67b03139fe43f1fcd03cb34620ec3d41eb407793" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "2009a38ac44ec7afa1a001e0dfa8358441510a64" },
|
||||
"symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "87e92ea31b2b61d45ad044cf7b2d9b66dad2a618" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b3ff5f33201f474d58f5be96244869f189bbc091" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" },
|
||||
"tree-sitter-just": { "branch": "main", "commit": "2262a409a3a5b832fe85ae563cd523c82f15f17c" },
|
||||
"tree-sitter-just": { "branch": "main", "commit": "195d414109b8177b49aa7525f8bd3b170275c9a0" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
|
||||
"undotree": { "branch": "master", "commit": "36ff7abb6b60980338344982ad4cdf03f7961ecd" },
|
||||
"venn.nvim": { "branch": "main", "commit": "e4d68341a73dd56c64955058821a58295fb337b1" },
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ function M.setup()
|
|||
require("rayandrew.remap")
|
||||
require("rayandrew.theme").setup()
|
||||
require("rayandrew.commands")
|
||||
require("rayandrew.neovide")
|
||||
-- require("rayandrew.filetype").setup()
|
||||
-- require("rayandrew.statusline").setup()
|
||||
end
|
||||
|
|
|
|||
5
lua/rayandrew/neovide.lua
Normal file
5
lua/rayandrew/neovide.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
if vim.g.neovide then
|
||||
-- set the font
|
||||
vim.o.guifont = "InconsolataGo Nerd Font Mono:h18"
|
||||
vim.cmd("cd ~/Personal")
|
||||
end
|
||||
|
|
@ -26,7 +26,7 @@ return {
|
|||
if venn_enabled == "nil" then
|
||||
vim.b.venn_enabled = true
|
||||
vim.cmd([[setlocal ve=all]])
|
||||
-- draw a line on HJKL keystokes
|
||||
-- draw a line on HJKL keystrokes
|
||||
vim.api.nvim_buf_set_keymap(0, "n", "J", "<C-v>j:VBox<CR>", { noremap = true })
|
||||
vim.api.nvim_buf_set_keymap(0, "n", "K", "<C-v>k:VBox<CR>", { noremap = true })
|
||||
vim.api.nvim_buf_set_keymap(0, "n", "L", "<C-v>l:VBox<CR>", { noremap = true })
|
||||
|
|
@ -94,6 +94,7 @@ return {
|
|||
|
||||
{
|
||||
"3rd/image.nvim",
|
||||
enabled = not vim.g.neovide,
|
||||
opts = {
|
||||
backend = "kitty",
|
||||
integrations = {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
local Util = require("rayandrew.util")
|
||||
|
||||
return {
|
||||
------------------------------
|
||||
-- File Management
|
||||
|
|
@ -88,7 +90,7 @@ return {
|
|||
-- end,
|
||||
config = function(_, opts)
|
||||
local function on_move(data)
|
||||
Util.lsp.on_rename(data.source, data.destination)
|
||||
-- Util.lsp.on_rename(data.source, data.destination)
|
||||
end
|
||||
|
||||
local events = require("neo-tree.events")
|
||||
|
|
|
|||
|
|
@ -4,6 +4,92 @@
|
|||
|
||||
local slow_format_filetypes = {}
|
||||
|
||||
-- https://github.com/chrisgrieser/.config/blob/7dc36c350976010b32ece078edd581687634811a/nvim/lua/plugins/linter-formatter.lua#L214-L234
|
||||
local linters = {
|
||||
lua = { "selene" },
|
||||
css = { "stylelint" },
|
||||
sh = { "shellcheck" },
|
||||
markdown = { "markdownlint", "vale" },
|
||||
yaml = { "yamllint" },
|
||||
python = { "pylint" },
|
||||
gitcommit = {},
|
||||
json = {},
|
||||
javascript = {},
|
||||
typescript = {},
|
||||
toml = {},
|
||||
applescript = {},
|
||||
bib = {},
|
||||
}
|
||||
|
||||
-- https://github.com/chrisgrieser/.config/blob/7dc36c350976010b32ece078edd581687634811a/nvim/lua/plugins/linter-formatter.lua#L214-L234
|
||||
-- PENDING https://github.com/mfussenegger/nvim-lint/issues/355
|
||||
for ft, _ in pairs(linters) do
|
||||
table.insert(linters[ft], "codespell")
|
||||
table.insert(linters[ft], "editorconfig-checker")
|
||||
end
|
||||
|
||||
-- https://github.com/chrisgrieser/.config/blob/7dc36c350976010b32ece078edd581687634811a/nvim/lua/plugins/linter-formatter.lua#L214-L234
|
||||
local formatters = {
|
||||
lua = { "stylua" },
|
||||
python = { "isort", "black" },
|
||||
javascript = { "biome" },
|
||||
typescript = { "biome" },
|
||||
json = { "biome" },
|
||||
jsonc = { "biome" },
|
||||
nix = { "nixpkgs_fmt" },
|
||||
yaml = { "prettier" },
|
||||
html = { "prettier" },
|
||||
markdown = {
|
||||
"markdown-toc",
|
||||
"markdownlint",
|
||||
-- "injected",
|
||||
},
|
||||
css = { "stylelint", "prettier" },
|
||||
sh = { "shellcheck", "shfmt" },
|
||||
bib = { "trim_whitespace", "bibtex-tidy" },
|
||||
["_"] = { "trim_whitespace", "trim_newlines", "squeeze_blanks" },
|
||||
["*"] = { "codespell" },
|
||||
}
|
||||
|
||||
local debuggers = {}
|
||||
|
||||
local dontInstall = {
|
||||
-- installed externally due to its plugins: https://github.com/williamboman/mason.nvim/issues/695
|
||||
"stylelint",
|
||||
-- not real formatters, but pseudo-formatters from conform.nvim
|
||||
"trim_whitespace",
|
||||
"trim_newlines",
|
||||
"squeeze_blanks",
|
||||
"injected",
|
||||
"nixpkgs_fmt",
|
||||
}
|
||||
|
||||
---given the linter- and formatter-list of nvim-lint and conform.nvim, extract a
|
||||
---list of all tools that need to be auto-installed
|
||||
---@param myLinters object[]
|
||||
---@param myFormatters object[]
|
||||
---@param myDebuggers string[]
|
||||
---@param ignoreTools string[]
|
||||
---@return string[] tools
|
||||
---@nodiscard
|
||||
local function toolsToAutoinstall(myLinters, myFormatters, myDebuggers, ignoreTools)
|
||||
-- get all linters, formatters, & debuggers and merge them into one list
|
||||
local linterList = vim.tbl_flatten(vim.tbl_values(myLinters))
|
||||
local formatterList = vim.tbl_flatten(vim.tbl_values(myFormatters))
|
||||
local tools = vim.list_extend(linterList, formatterList)
|
||||
vim.list_extend(tools, myDebuggers)
|
||||
|
||||
-- only unique tools
|
||||
table.sort(tools)
|
||||
tools = vim.fn.uniq(tools)
|
||||
|
||||
-- remove exceptions not to install
|
||||
tools = vim.tbl_filter(function(tool)
|
||||
return not vim.tbl_contains(ignoreTools, tool)
|
||||
end, tools)
|
||||
return tools
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
{
|
||||
|
|
@ -17,6 +103,7 @@ return {
|
|||
vim.g.lsp_zero_extend_lspconfig = 0
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
lazy = false,
|
||||
|
|
@ -104,13 +191,7 @@ return {
|
|||
},
|
||||
},
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "isort", "black" },
|
||||
typescript = { { "prettierd", "prettier" }, { "eslint_d", "eslint" } },
|
||||
javascript = { { "prettierd", "prettier" }, { "eslint_d", "eslint" } },
|
||||
nix = { "nixfmt" },
|
||||
},
|
||||
formatters_by_ft = formatters,
|
||||
format_on_save = function(bufnr)
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
|
|
@ -200,4 +281,45 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
|
||||
{ -- Linter integration
|
||||
"mfussenegger/nvim-lint",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
lint.linters_by_ft = linters
|
||||
|
||||
lint.linters.shellcheck.args = { "--shell=bash", "--format=json", "-" }
|
||||
lint.linters.markdownlint.args = {
|
||||
"--disable=no-trailing-spaces", -- not disabled in config, so it's enabled for formatting
|
||||
"--disable=no-multiple-blanks",
|
||||
}
|
||||
lint.linters["editorconfig-checker"].args = {
|
||||
"-no-color",
|
||||
"-disable-max-line-length", -- only rule of thumb
|
||||
"-disable-trim-trailing-whitespace", -- will be formatted anyway
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
{ -- auto-install missing linters & formatters
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{ "<leader>pM", vim.cmd.MasonToolsUpdate, desc = " Mason Update" },
|
||||
},
|
||||
dependencies = { "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim" },
|
||||
config = function()
|
||||
local tools = toolsToAutoinstall(linters, formatters, debuggers, dontInstall)
|
||||
|
||||
require("mason-tool-installer").setup({
|
||||
ensure_installed = tools,
|
||||
run_on_start = false, -- triggered manually, since not working with lazy-loading
|
||||
})
|
||||
|
||||
-- clean unused & install missing
|
||||
vim.defer_fn(vim.cmd.MasonToolsInstall, 500)
|
||||
vim.defer_fn(vim.cmd.MasonToolsClean, 1000) -- delayed, so noice.nvim is loaded before
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ return {
|
|||
"<leader>sp",
|
||||
function()
|
||||
local Util = require("rayandrew.util")
|
||||
local fn = Util.telescope("live_grep")
|
||||
local fn = Util.telescope("live_grep", { cwd = vim.loop.cwd() })
|
||||
fn()
|
||||
end,
|
||||
desc = "Find in Files (Grep)",
|
||||
|
|
|
|||
Loading…
Reference in a new issue