Compare commits
2 Commits
4c2f8f17d3
...
InoriShio
| Author | SHA1 | Date | |
|---|---|---|---|
| 91773e0a00 | |||
| ee4515da26 |
@@ -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
|
||||
@@ -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
@@ -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", {
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ prettier.setup({
|
||||
"json",
|
||||
"less",
|
||||
"markdown",
|
||||
"rust",
|
||||
"scss",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -9,4 +9,9 @@ return {
|
||||
---@type render.md.UserConfig
|
||||
opts = require "config.format.markdown",
|
||||
},
|
||||
{
|
||||
'mrcjkb/rustaceanvim',
|
||||
version = '^9',
|
||||
-- lazy = false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -15,7 +15,8 @@ $packages = @(
|
||||
"GNU.Wget2",
|
||||
"GnuWin32.UnZip",
|
||||
"GnuWin32.Gzip",
|
||||
"7zip.7zip"
|
||||
"7zip.7zip",
|
||||
"PSScriptAnalyzer"
|
||||
)
|
||||
|
||||
for ($i = 0; $i -lt $packages.Count; $i++) {
|
||||
|
||||
Reference in New Issue
Block a user