update
This commit is contained in:
parent
f14ec35778
commit
3b915900ee
1 changed files with 23 additions and 20 deletions
41
init.lua
41
init.lua
|
|
@ -1,4 +1,4 @@
|
||||||
-------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
-- Bootstrap
|
-- Bootstrap
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
|
@ -384,13 +384,7 @@ local sources = {
|
||||||
null_ls.builtins.formatting.prettier,
|
null_ls.builtins.formatting.prettier,
|
||||||
}
|
}
|
||||||
null_ls.setup({ sources = sources })
|
null_ls.setup({ sources = sources })
|
||||||
require('lspconfig').clangd.setup {}
|
vim.lsp.config('luals', {
|
||||||
require('lspconfig').zls.setup {}
|
|
||||||
require('lspconfig').ruby_lsp.setup {}
|
|
||||||
require('lspconfig').ts_ls.setup {}
|
|
||||||
require('lspconfig').gopls.setup {}
|
|
||||||
require('lspconfig').basedpyright.setup {}
|
|
||||||
require 'lspconfig'.lua_ls.setup {
|
|
||||||
on_init = function(client)
|
on_init = function(client)
|
||||||
local path = client.workspace_folders[1].name
|
local path = client.workspace_folders[1].name
|
||||||
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
|
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
|
||||||
|
|
@ -412,7 +406,27 @@ require 'lspconfig'.lua_ls.setup {
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {}
|
Lua = {}
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
vim.lsp.config('ruff', {
|
||||||
|
on_attach = function(client)
|
||||||
|
client.server_capabilities.hoverProvider = false
|
||||||
|
end,
|
||||||
|
init_options = {
|
||||||
|
settings = {
|
||||||
|
args = {},
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
vim.lsp.enable('lua_ls')
|
||||||
|
vim.lsp.enable('ruff')
|
||||||
|
vim.lsp.enable('clangd')
|
||||||
|
vim.lsp.enable('zls')
|
||||||
|
vim.lsp.enable('ruby_lsp')
|
||||||
|
vim.lsp.enable('ts_ls')
|
||||||
|
vim.lsp.enable('gopls')
|
||||||
|
vim.lsp.enable('basedpyright')
|
||||||
|
vim.lsp.enable('gdscript')
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||||
pattern = { "*.zig" },
|
pattern = { "*.zig" },
|
||||||
callback = function()
|
callback = function()
|
||||||
|
|
@ -439,17 +453,6 @@ vim.api.nvim_create_autocmd('BufWritePre', {
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
require('lspconfig').ruff.setup {
|
|
||||||
on_attach = function(client)
|
|
||||||
client.server_capabilities.hoverProvider = false
|
|
||||||
end,
|
|
||||||
init_options = {
|
|
||||||
settings = {
|
|
||||||
args = {},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
require 'lspconfig'.gdscript.setup {}
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- Debugging
|
-- Debugging
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue