Compare commits

...

2 Commits

Author SHA1 Message Date
Inorishio 91773e0a00 pwsh & rustfmt 2026-05-22 10:11:25 +02:00
Inorishio ee4515da26 Circle. 2026-04-28 20:15:54 +02:00
10 changed files with 63 additions and 19 deletions
+25
View File
@@ -0,0 +1,25 @@
function! neoformat#formatters#pwsh#enabled() abort
return ['pwshfmt']
endfunction
function! neoformat#formatters#pwsh#pwshfmt() abort
if has('win32') || has('win64')
let l:args = [
\ '-NoProfile',
\ '-Command',
\ 'Invoke-Formatter',
\ ]
else
let l:args = [
\ '-NoProfile',
\ '-Command',
\ '"Import-Module (Resolve-Path \"/opt/powershell-editor-services/PSScriptAnalyzer/*/PSScriptAnalyzer.psd1\" | Select-Object -ExpandProperty Path); Invoke-Formatter -ScriptDefinition (\$input | Out-String)"'
\ ]
endif
return {
\ 'exe': 'pwsh',
\ 'args': l:args,
\ 'stdin': 1,
\ }
endfunction
+18
View File
@@ -0,0 +1,18 @@
local bufnr = vim.api.nvim_get_current_buf()
vim.keymap.set(
"n",
"<leader>a",
function()
vim.cmd.RustLsp('codeAction') -- supports rust-analyzer's grouping
-- or vim.lsp.buf.codeAction() if you don't want grouping.
end,
{ silent = true, buffer = bufnr }
)
vim.keymap.set(
"n",
"K", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions
function()
vim.cmd.RustLsp({'hover', 'actions'})
end,
{ silent = true, buffer = bufnr }
)
+6 -6
View File
@@ -1,12 +1,12 @@
local autocmd = vim.api.nvim_create_autocmd
autocmd("LspAttach", {
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client then
vim.lsp.document_color.enable(false, { bufnr = args.buf })
end
end,
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client then
vim.lsp.document_color.enable(false, { bufnr = args.buf })
end
end,
})
autocmd("VimLeave", {
+2 -1
View File
@@ -12,7 +12,8 @@ M.plugin = {
vim.g.neoformat_enabled_sh = { "shfmt" }
vim.g.neoformat_enabled_bash = { "shfmt" }
vim.g.neoformat_enabled_zsh = { "shfmt" }
vim.g.neoformat_enabled_powershell = { "pwshfmt" } -- experimental
vim.g.neoformat_enabled_rust = { "rustfmt" }
vim.g.neoformat_enabled_pwsh = { "pwshfmt" }
end,
}
+1
View File
@@ -11,6 +11,7 @@ prettier.setup({
"json",
"less",
"markdown",
"rust",
"scss",
"typescript",
"typescriptreact",
+1 -1
View File
@@ -1,7 +1,7 @@
require("colorizer").setup {
user_default_options = {
mode = "virtualtext",
virtualtext = "",
virtualtext = "",
css = true,
tailwind = true,
sass = { enable = true, parsers = { "css" } },
+3 -4
View File
@@ -13,14 +13,14 @@ vim.opt.wrap = true
vim.opt.linebreak = true
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = vim.fn.stdpath('data') .. '/undodir'
vim.opt.undodir = vim.fn.stdpath "data" .. "/undodir"
vim.opt.undofile = true
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes:1"
vim.opt.isfname:append("@-@")
vim.opt.isfname:append "@-@"
vim.opt.updatetime = 50
vim.opt.colorcolumn = "80"
vim.opt.textwidth = 80
@@ -34,7 +34,6 @@ vim.o.ignorecase = true
vim.o.smartcase = true
vim.o.mouse = "a"
vim.o.number = true
vim.o.termguicolors = true
vim.o.numberwidth = 3
vim.o.ruler = false
vim.o.showmode = false
@@ -52,6 +51,6 @@ local sep = is_windows and "\\" or "/"
local delim = is_windows and ";" or ":"
vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. delim .. vim.env.PATH
vim.api.nvim_set_hl( 0, "Cursor", { reverse = true })
vim.api.nvim_set_hl(0, "Cursor", { reverse = true })
vim.g.tpipeline_restore = 1
+5
View File
@@ -9,4 +9,9 @@ return {
---@type render.md.UserConfig
opts = require "config.format.markdown",
},
{
'mrcjkb/rustaceanvim',
version = '^9',
-- lazy = false,
},
}
-6
View File
@@ -190,12 +190,6 @@ return {
vim.g.minimal_italic_comments = true
end,
},
{
"ThePrimeagen/refactoring.nvim",
config = function()
require "config.format.refactoring"
end,
},
{
"Yazeed1s/minimal.nvim",
config = function()
+2 -1
View File
@@ -15,7 +15,8 @@ $packages = @(
"GNU.Wget2",
"GnuWin32.UnZip",
"GnuWin32.Gzip",
"7zip.7zip"
"7zip.7zip",
"PSScriptAnalyzer"
)
for ($i = 0; $i -lt $packages.Count; $i++) {