Skip to content

Commit 8118049

Browse files
committed
Update linter and formatter configurations
Includes: - Replace `biome-check` and `prettierd` with `oxlint` and `oxfmt` in `conform.lua`. - Add `oxfmtrc.json` to the dotfiles repository and `install.sh`. - Update `treesitter.lua` configuration to use `branch = "main"` and manual setup. - Enable `codelens` using `vim.lsp.codelens.enable` in `lsp.lua`. - Remove `rainbow-delimiters.nvim` plugin. - Update AI model reference in `nvim/prompts/commit.md`.
1 parent 01460d6 commit 8118049

6 files changed

Lines changed: 37 additions & 77 deletions

File tree

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
files=(bash bashrc bash_profile inputrc vale vale.ini gitconfig vimrc ignore tmux.conf stylua.toml)
2+
files=(bash bashrc bash_profile inputrc vale vale.ini gitconfig vimrc oxfmtrc.json ignore tmux.conf stylua.toml)
33
dir="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
44

55
function rm-if-present { # $1: to-path $2: from-path

nvim/lua/wavded/plugins/conform.lua

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,52 +8,30 @@ return {
88
lsp_format = "fallback",
99
},
1010
formatters_by_ft = {
11-
css = { "oxfmt", "biome-check", "prettierd", stop_after_first = true },
11+
css = { "oxfmt" },
1212
go = { "golangci-lint" },
13-
html = { "oxfmt", "biome-check", "prettierd", stop_after_first = true },
13+
html = { "oxfmt" },
1414
java = { "google-java-format" },
15-
javascript = {
16-
"oxfmt",
17-
"biome-check",
18-
"prettierd",
19-
stop_after_first = true,
20-
},
21-
javascriptreact = {
22-
"oxfmt",
23-
"biome-check",
24-
"prettierd",
25-
stop_after_first = true,
26-
},
27-
json = { "oxfmt", "biome-check", "prettierd", stop_after_first = true },
28-
jsonc = { "oxfmt", "biome-check", "prettierd", stop_after_first = true },
15+
javascript = { "oxlint", "oxfmt" },
16+
javascriptreact = { "oxlint", "oxfmt" },
17+
json = { "oxfmt" },
18+
jsonc = { "oxfmt" },
2919
kotlin = { "ktlint" },
3020
lua = { "stylua" },
31-
markdown = { "oxfmt", "prettierd" },
21+
markdown = { "oxfmt" },
3222
pug = { "prettierd" },
3323
rust = { "rustfmt" },
34-
scss = { "oxfmt", "prettierd" },
24+
scss = { "oxfmt" },
3525
sql = { "sqruff" },
36-
toml = { "oxfmt", "prettierd" },
37-
typescript = {
38-
"deno_fmt",
39-
"oxfmt",
40-
"biome-check",
41-
"prettierd",
42-
stop_after_first = true,
43-
},
44-
typescriptreact = {
45-
"oxfmt",
46-
"biome-check",
47-
"prettierd",
48-
stop_after_first = true,
49-
},
50-
yaml = { "oxfmt", "prettierd" },
26+
toml = { "oxfmt" },
27+
typescript = { "deno_fmt", "oxlint", "oxfmt" },
28+
typescriptreact = { "oxlint", "oxfmt" },
29+
yaml = { "oxfmt" },
5130
},
5231
format_on_save = { timeout_ms = 3000 },
5332
notify_no_formatters = false,
5433
formatters = {
55-
oxfmt = { require_cwd = true },
56-
["biome-check"] = { require_cwd = true },
34+
oxlint = { require_cwd = true, exit_codes = { 0, 1 } },
5735
deno_fmt = {
5836
cwd = function(self, ctx)
5937
local root = require("conform.util").root_file({
@@ -64,12 +42,6 @@ return {
6442
end,
6543
require_cwd = true,
6644
},
67-
prettierd = {
68-
condition = function(_, ctx)
69-
return string.match(vim.fs.basename(ctx.filename), ".sls") == nil
70-
end,
71-
require_cwd = true,
72-
},
7345
},
7446
},
7547
init = function()

nvim/lua/wavded/plugins/lsp.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,7 @@ return {
195195
local bufnr = args.buf
196196
local client = vim.lsp.get_client_by_id(args.data.client_id)
197197
if client ~= nil and client.server_capabilities.codeLensProvider then
198-
vim.api.nvim_create_autocmd(
199-
{ "BufEnter", "CursorHold", "InsertLeave" },
200-
{
201-
callback = vim.lsp.codelens.refresh,
202-
buffer = bufnr,
203-
}
204-
)
198+
vim.lsp.codelens.enable(true, { bufnr = bufnr })
205199
end
206200
if
207201
client ~= nil

nvim/lua/wavded/plugins/treesitter.lua

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
return {
22
{
33
"nvim-treesitter/nvim-treesitter",
4+
branch = "main",
45
version = false,
5-
event = "VeryLazy",
66
build = ":TSUpdate",
7-
lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline
8-
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
7+
cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" },
8+
opts_extend = { "ensure_installed" },
99
opts = {
1010
ensure_installed = {
1111
"bash",
1212
"comment",
1313
"css",
14+
"diff",
1415
"dockerfile",
1516
"gitcommit",
1617
"gitignore",
@@ -43,34 +44,22 @@ return {
4344
"xml",
4445
"yaml",
4546
},
46-
auto_install = true,
47-
highlight = {
48-
enable = true,
49-
disable = function(_, bufnr)
50-
return vim.api.nvim_buf_line_count(bufnr) > 5000
51-
end,
52-
additional_vim_regex_highlighting = false,
53-
},
54-
indent = { enable = true },
55-
autotag = { enable = true },
56-
textsubjects = {
57-
enable = true,
58-
keymaps = { ["."] = "textsubjects-smart" },
59-
},
6047
},
6148
config = function(_, opts)
62-
require("nvim-treesitter.configs").setup(opts)
49+
local TS = require("nvim-treesitter")
50+
TS.install(opts.ensure_installed)
51+
TS.setup(opts)
52+
vim.api.nvim_create_autocmd("FileType", {
53+
callback = function(args)
54+
local ok = pcall(vim.treesitter.start)
55+
if ok then
56+
vim.bo[args.buf].indentexpr =
57+
"v:lua.require'nvim-treesitter'.indentexpr()"
58+
end
59+
end,
60+
})
6361
end,
6462
},
65-
{
66-
-- rainbow delimiters
67-
{
68-
"HiPhish/rainbow-delimiters.nvim",
69-
event = "VeryLazy",
70-
main = "rainbow-delimiters.setup",
71-
opts = {},
72-
},
73-
},
7463
{
7564
-- comments
7665
"folke/ts-comments.nvim",

nvim/prompts/commit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ opts:
88
is_slash_cmd: true
99
adapter:
1010
name: copilot
11-
model: gpt-5-mini
11+
model: gemini-3-flash-preview
1212
---
1313

1414
## user

oxfmtrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 80
3+
"semi": false,
4+
"bracketSpacing": false
5+
}

0 commit comments

Comments
 (0)