Skip to content

Commit

Permalink
Misc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wavded committed May 3, 2024
1 parent 39a8309 commit 2219439
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 5 deletions.
1 change: 0 additions & 1 deletion ignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
vendor
coverage
elm-stuff
jsdocs
Expand Down
14 changes: 14 additions & 0 deletions nvim/lua/alternate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,27 @@ local handlers = {
return fname:gsub(".js$", "_test.js")
end
end,
javascriptreact = function(fname)
if fname:match("_test.jsx$") then
return fname:gsub("_test.jsx$", ".jsx")
else
return fname:gsub(".jsx$", "_test.jsx")
end
end,
typescript = function(fname)
if fname:match("_test.ts$") then
return fname:gsub("_test.ts$", ".ts")
else
return fname:gsub(".ts$", "_test.ts")
end
end,
typescriptreact = function(fname)
if fname:match("_test.tsx$") then
return fname:gsub("_test.tsx$", ".tsx")
else
return fname:gsub(".tsx$", "_test.tsx")
end
end,
}

return function()
Expand Down
2 changes: 1 addition & 1 deletion nvim/lua/configs/lang.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
vim.cmd(
[[au FileType javascript,typescript map <leader>e :100split \| term NODE_ENV=test TS_NODE_FILES=true nyc ts-node %<cr>]]
[[au FileType javascript,typescript,javascriptreact,typescriptreact map <leader>e :100split \| term NODE_ENV=test vitest run %<cr>]]
)

vim.g.plantuml_executable_script =
Expand Down
3 changes: 1 addition & 2 deletions nvim/lua/lsp/null-ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ function M.setup(options)
sources = {
nls.builtins.code_actions.gitsigns,
nls.builtins.formatting.stylua,
nls.builtins.formatting.prettierd.with({
nls.builtins.formatting.prettier.with({
extra_filetypes = { "pug" },
}),
nls.builtins.formatting.rustfmt,
nls.builtins.formatting.google_java_format,
nls.builtins.formatting.phpcsfixer,
nls.builtins.formatting.goimports,
Expand Down
1 change: 1 addition & 0 deletions nvim/lua/plugins/fzf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require("fzf-lua").setup({
fzf_opts = {
["--layout"] = "default",
},
file_ignore_patterns = { "pnpm.lock" },
files = {
actions = {
["ctrl-e"] = function(selected)
Expand Down
1 change: 1 addition & 0 deletions nvim/lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ require("lazy").setup({

-- file tree
{ "kyazdani42/nvim-tree.lua", config = use("tree") },
{ "antosha417/nvim-lsp-file-operations" },
{ "ibhagwan/fzf-lua", config = use("fzf") }, -- finder

-- treesitter
Expand Down
3 changes: 3 additions & 0 deletions nvim/lua/plugins/tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,6 @@ require("nvim-tree").setup({
})

u.map("n", "<space>t", ":NvimTreeFindFileToggle<cr>", { silent = true })

-- must load after nvim-tree
require("lsp-file-operations").setup()
2 changes: 2 additions & 0 deletions nvim/spell/en.utf-8.add
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,5 @@ OpenID
OAuth2
LDAP
blog
pnpm
YouTrack
Binary file modified nvim/spell/en.utf-8.add.spl
Binary file not shown.
1 change: 0 additions & 1 deletion vale/styles/adc/Weasel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ tokens:
- waverly
- weakly
- wearily
- weekly
- wildly
- wisely
- worldly
Expand Down

0 comments on commit 2219439

Please sign in to comment.