mirror of https://github.com/gabehf/nvim-conf.git
parent
91ba5541a3
commit
cc4abb76ee
@ -1,23 +0,0 @@
|
|||||||
local lsp_zero = require('lsp-zero')
|
|
||||||
|
|
||||||
lsp_zero.on_attach(function(client, bufnr)
|
|
||||||
-- see :help lsp-zero-keybindings
|
|
||||||
-- to learn the available actions
|
|
||||||
lsp_zero.default_keymaps({buffer = bufnr})
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- here you can setup the language servers
|
|
||||||
require('mason').setup({})
|
|
||||||
require('mason-lspconfig').setup({
|
|
||||||
ensure_installed = {
|
|
||||||
'tsserver',
|
|
||||||
'rust_analyzer',
|
|
||||||
'gopls',
|
|
||||||
'clangd',
|
|
||||||
}
|
|
||||||
handlers = {
|
|
||||||
function(server_name)
|
|
||||||
require('lspconfig')[server_name].setup({})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
@ -1,11 +1,37 @@
|
|||||||
return {
|
return {
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
|
event = { "BufWritePre" },
|
||||||
|
cmd = { "ConformInfo" },
|
||||||
opts = {
|
opts = {
|
||||||
|
format_on_save = function(bufnr)
|
||||||
|
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
return { timeout_ms = 3000, lsp_fallback = true }
|
||||||
|
end,
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
|
bash = { "shfmt" },
|
||||||
|
sh = { "shfmt" },
|
||||||
|
fish = { "fish_indent" },
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
|
go = { "goimports", "gofumpt", "goimports-reviser" },
|
||||||
|
javascript = { { "prettierd", "prettier" } },
|
||||||
|
typescript = { { "prettierd", "prettier" } },
|
||||||
|
javascriptreact = { { "prettierd", "prettier" } },
|
||||||
|
typescriptreact = { { "prettierd", "prettier" } },
|
||||||
|
vue = { { "prettierd", "prettier" } },
|
||||||
|
css = { { "prettierd", "prettier" } },
|
||||||
|
scss = { { "prettierd", "prettier" } },
|
||||||
|
less = { { "prettierd", "prettier" } },
|
||||||
|
html = { { "prettierd", "prettier" } },
|
||||||
|
json = { { "prettierd", "prettier" } },
|
||||||
|
jsonc = { { "prettierd", "prettier" } },
|
||||||
|
yaml = { { "prettierd", "prettier" } },
|
||||||
|
markdown = { { "prettierd", "prettier" } },
|
||||||
|
["markdown.mdx"] = { { "prettierd", "prettier" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("conform").setup(opts)
|
require("conform").setup(opts)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,44 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
'williamboman/mason.nvim',
|
"williamboman/mason.nvim",
|
||||||
cmd = { "Mason", "MasonInstall", "MasonUpdate" },
|
cmd = { "Mason", "MasonInstall", "MasonUpdate" },
|
||||||
config = function(_, opts_)
|
config = function(_, opts)
|
||||||
dofile(vim.g.base46_cache .. "mason")
|
dofile(vim.g.base46_cache .. "mason")
|
||||||
require('mason').setup(opts)
|
require("mason").setup(opts)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{'williamboman/mason-lspconfig.nvim'},
|
{ "williamboman/mason-lspconfig.nvim" },
|
||||||
{'VonHeikemen/lsp-zero.nvim', branch = 'v3.x'},
|
{
|
||||||
{'neovim/nvim-lspconfig'},
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
{'hrsh7th/cmp-nvim-lsp'},
|
branch = "v3.x",
|
||||||
{'hrsh7th/nvim-cmp'},
|
config = function()
|
||||||
{'L3MON4D3/LuaSnip'},
|
local lsp_zero = require "lsp-zero"
|
||||||
|
lsp_zero.on_attach(function(client, bufnr)
|
||||||
|
-- see :help lsp-zero-keybindings
|
||||||
|
-- to learn the available actions
|
||||||
|
lsp_zero.default_keymaps { buffer = bufnr }
|
||||||
|
end)
|
||||||
|
-- here you can setup the language servers
|
||||||
|
require("mason").setup {}
|
||||||
|
require("mason-lspconfig").setup {
|
||||||
|
ensure_installed = {
|
||||||
|
"tsserver",
|
||||||
|
"rust_analyzer",
|
||||||
|
"gopls",
|
||||||
|
"clangd",
|
||||||
|
"lua_ls",
|
||||||
|
"pyright",
|
||||||
|
},
|
||||||
|
handlers = {
|
||||||
|
function(server_name)
|
||||||
|
require("lspconfig")[server_name].setup {}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ "neovim/nvim-lspconfig" },
|
||||||
|
{ "hrsh7th/cmp-nvim-lsp" },
|
||||||
|
{ "hrsh7th/nvim-cmp" },
|
||||||
|
{ "L3MON4D3/LuaSnip" },
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
return {
|
return {
|
||||||
"NvChad/nvim-colorizer.lua",
|
"NvChad/nvim-colorizer.lua",
|
||||||
-- event = "User FilePost",
|
event = "User FilePost",
|
||||||
-- opts = { user_default_options = { names = false } },
|
opts = { user_default_options = { names = false } },
|
||||||
-- config = function(_, opts)
|
config = function(_, opts)
|
||||||
-- require('colorizer').setup(opts)
|
require("colorizer").setup(opts)
|
||||||
--
|
|
||||||
-- vim.defer_fn(function()
|
vim.defer_fn(function()
|
||||||
-- require('colorizer').attach_to_buffer(0)
|
require("colorizer").attach_to_buffer(0)
|
||||||
-- end, 0)
|
end, 0)
|
||||||
-- end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
"timpope/vim-sleuth",
|
||||||
|
}
|
||||||
Loading…
Reference in new issue