mason is back baby
This commit is contained in:
@@ -160,16 +160,6 @@ require'lazy'.setup{ --{{{1
|
|||||||
vim.keymap.set("n", "-", vim.cmd.Oil, { desc = "Open parent directory" })
|
vim.keymap.set("n", "-", vim.cmd.Oil, { desc = "Open parent directory" })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ 'Williamboman/mason.nvim', --{{{3
|
|
||||||
config = function()
|
|
||||||
require'mason'.setup {
|
|
||||||
registries = {
|
|
||||||
'github:mason-org/mason-registry',
|
|
||||||
'github:crashdummyy/mason-registry',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{ 'seblyng/roslyn.nvim', --{{{2
|
{ 'seblyng/roslyn.nvim', --{{{2
|
||||||
--WARN: requires html-lsp, roslyn and rzls installed via Mason
|
--WARN: requires html-lsp, roslyn and rzls installed via Mason
|
||||||
dependencies = { 'tris203/rzls.nvim', },
|
dependencies = { 'tris203/rzls.nvim', },
|
||||||
@@ -182,7 +172,7 @@ require'lazy'.setup{ --{{{1
|
|||||||
'--logLevel=Information',
|
'--logLevel=Information',
|
||||||
'--extensionLogDirectory=' .. vim.fs.dirname(vim.lsp.get_log_path()),
|
'--extensionLogDirectory=' .. vim.fs.dirname(vim.lsp.get_log_path()),
|
||||||
'--razorSourceGenerator=' .. vim.fs.joinpath(
|
'--razorSourceGenerator=' .. vim.fs.joinpath(
|
||||||
vim.fn.stdpath'data',
|
vim.fn.stdpath'data' --[[@as string]],
|
||||||
'mason',
|
'mason',
|
||||||
'packages',
|
'packages',
|
||||||
'roslyn',
|
'roslyn',
|
||||||
@@ -190,7 +180,7 @@ require'lazy'.setup{ --{{{1
|
|||||||
'Microsoft.CodeAnalysis.Razor.Compiler.dll'
|
'Microsoft.CodeAnalysis.Razor.Compiler.dll'
|
||||||
),
|
),
|
||||||
'--razorDesignTimePath=' .. vim.fs.joinpath(
|
'--razorDesignTimePath=' .. vim.fs.joinpath(
|
||||||
vim.fn.stdpath'data',
|
vim.fn.stdpath'data' --[[@as string]],
|
||||||
'mason',
|
'mason',
|
||||||
'packages',
|
'packages',
|
||||||
'rzls',
|
'rzls',
|
||||||
@@ -219,7 +209,7 @@ require'lazy'.setup{ --{{{1
|
|||||||
exe = {
|
exe = {
|
||||||
'dotnet',
|
'dotnet',
|
||||||
vim.fs.joinpath(
|
vim.fs.joinpath(
|
||||||
vim.fn.stdpath'data',
|
vim.fn.stdpath'data' --[[@as string]],
|
||||||
'mason',
|
'mason',
|
||||||
'packages',
|
'packages',
|
||||||
'roslyn',
|
'roslyn',
|
||||||
@@ -229,19 +219,38 @@ require'lazy'.setup{ --{{{1
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{ "folke/lazydev.nvim", --{{{2
|
||||||
|
ft = "lua", -- only load on lua files
|
||||||
|
opts = {
|
||||||
|
library = {
|
||||||
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{ 'neovim/nvim-lspconfig', --{{{2
|
{ 'neovim/nvim-lspconfig', --{{{2
|
||||||
|
dependencies = {
|
||||||
|
'williamboman/mason.nvim',
|
||||||
|
'williamboman/mason-lspconfig.nvim',
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require'lspconfig'.gopls.setup{}
|
require'mason'.setup {
|
||||||
require'lspconfig'.rust_analyzer.setup{}
|
registries = {
|
||||||
|
'github:mason-org/mason-registry',
|
||||||
|
'github:crashdummyy/mason-registry',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
require'mason-lspconfig'.setup()
|
||||||
|
require'mason-lspconfig'.setup_handlers{
|
||||||
|
function (server_name)
|
||||||
|
require'lspconfig'[server_name].setup{}
|
||||||
|
end,
|
||||||
|
zls = function()
|
||||||
|
require'lspconfig'.zls.setup{ enable_autofix = false }
|
||||||
|
vim.g.zig_fmt_autosave = false
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
require'lspconfig'.gdscript.setup{}
|
require'lspconfig'.gdscript.setup{}
|
||||||
require'lspconfig'.clangd.setup{}
|
|
||||||
require'lspconfig'.pyright.setup{}
|
|
||||||
require'lspconfig'.ts_ls.setup{}
|
|
||||||
require'lspconfig'.jdtls.setup{}
|
|
||||||
|
|
||||||
require'lspconfig'.zls.setup{ enable_autofix = false }
|
|
||||||
vim.g.zig_fmt_autosave = false
|
|
||||||
|
|
||||||
vim.cmd [[
|
vim.cmd [[
|
||||||
noremap ,rn :lua vim.lsp.buf.rename()<CR>
|
noremap ,rn :lua vim.lsp.buf.rename()<CR>
|
||||||
noremap ,fd :lua vim.lsp.buf.definition()<CR>
|
noremap ,fd :lua vim.lsp.buf.definition()<CR>
|
||||||
@@ -336,7 +345,7 @@ require'lazy'.setup{ --{{{1
|
|||||||
'S',
|
'S',
|
||||||
function ()
|
function ()
|
||||||
---@type string
|
---@type string
|
||||||
local snippets_path = vim.fn.stdpath('config') .. '/snippets/' .. vim.api.nvim_buf_get_option(0, "filetype") .. '.snippets'
|
local snippets_path = vim.fn.stdpath('config') .. '/snippets/' .. vim.bo.filetype .. '.snippets'
|
||||||
|
|
||||||
if not file_exists(snippets_path) then
|
if not file_exists(snippets_path) then
|
||||||
local file = io.open( snippets_path, 'w' )
|
local file = io.open( snippets_path, 'w' )
|
||||||
|
|||||||
Reference in New Issue
Block a user