added more to the ensure installed of treesitter
This commit is contained in:
parent
198370ae5b
commit
9a4ca7c839
71
init.lua
71
init.lua
|
@ -577,6 +577,20 @@ require('lazy').setup({
|
||||||
{
|
{
|
||||||
-- Main LSP Configuration
|
-- Main LSP Configuration
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
|
-- opts = {
|
||||||
|
-- servers = { eslint = {} },
|
||||||
|
-- setup = {
|
||||||
|
-- eslint = function()
|
||||||
|
-- require('lazyvim.util').lsp.on_attach(function(client)
|
||||||
|
-- if client.name == 'eslint' then
|
||||||
|
-- client.server_capabilities.documentFormattingProvider = true
|
||||||
|
-- elseif client.name == 'tsserver' then
|
||||||
|
-- client.server_capabilities.documentFormattingProvider = false
|
||||||
|
-- end
|
||||||
|
-- end)
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'saghen/blink.cmp',
|
'saghen/blink.cmp',
|
||||||
-- Automatically install LSPs and related tools to stdpath for Neovim
|
-- Automatically install LSPs and related tools to stdpath for Neovim
|
||||||
|
@ -588,7 +602,7 @@ require('lazy').setup({
|
||||||
config = function()
|
config = function()
|
||||||
require('mason').setup()
|
require('mason').setup()
|
||||||
require('mason-lspconfig').setup {
|
require('mason-lspconfig').setup {
|
||||||
ensure_installed = { 'ts_ls', 'lua_ls', 'eslint_lsp' },
|
ensure_installed = { 'lua_ls' },
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -882,23 +896,23 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
notify_on_error = false,
|
-- notify_on_error = false,
|
||||||
format_on_save = function(bufnr)
|
-- format_on_save = function(bufnr)
|
||||||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
-- -- Disable "format_on_save lsp_fallback" for languages that don't
|
||||||
-- have a well standardized coding style. You can add additional
|
-- -- have a well standardized coding style. You can add additional
|
||||||
-- languages here or re-enable it for the disabled ones.
|
-- -- languages here or re-enable it for the disabled ones.
|
||||||
local disable_filetypes = { c = true, cpp = true }
|
-- local disable_filetypes = { c = true, cpp = true }
|
||||||
local lsp_format_opt
|
-- local lsp_format_opt
|
||||||
if disable_filetypes[vim.bo[bufnr].filetype] then
|
-- if disable_filetypes[vim.bo[bufnr].filetype] then
|
||||||
lsp_format_opt = 'never'
|
-- lsp_format_opt = 'never'
|
||||||
else
|
-- else
|
||||||
lsp_format_opt = 'fallback'
|
-- lsp_format_opt = 'fallback'
|
||||||
end
|
-- end
|
||||||
return {
|
-- return {
|
||||||
timeout_ms = 500,
|
-- timeout_ms = 500,
|
||||||
lsp_format = lsp_format_opt,
|
-- lsp_format = lsp_format_opt,
|
||||||
}
|
-- }
|
||||||
end,
|
-- end,
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
|
@ -907,6 +921,8 @@ require('lazy').setup({
|
||||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||||
javascript = { 'prettier', stop_after_first = true },
|
javascript = { 'prettier', stop_after_first = true },
|
||||||
typescript = { 'prettier', stop_after_first = true },
|
typescript = { 'prettier', stop_after_first = true },
|
||||||
|
typescriptreact = { 'prettier', stop_after_first = true },
|
||||||
|
javascriptreact = { 'prettier', stop_after_first = true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1109,6 +1125,7 @@ require('lazy').setup({
|
||||||
'c',
|
'c',
|
||||||
'diff',
|
'diff',
|
||||||
'html',
|
'html',
|
||||||
|
'css',
|
||||||
'lua',
|
'lua',
|
||||||
'luadoc',
|
'luadoc',
|
||||||
'query',
|
'query',
|
||||||
|
@ -1118,7 +1135,15 @@ require('lazy').setup({
|
||||||
'python',
|
'python',
|
||||||
'typescript',
|
'typescript',
|
||||||
'javascript',
|
'javascript',
|
||||||
-- 'go',
|
'go',
|
||||||
|
'dockerfile',
|
||||||
|
'gitignore',
|
||||||
|
'graphql',
|
||||||
|
'query',
|
||||||
|
'markdown',
|
||||||
|
'markdown_inline',
|
||||||
|
'yaml',
|
||||||
|
'prisma'
|
||||||
},
|
},
|
||||||
-- Autoinstall languages that are not installed
|
-- Autoinstall languages that are not installed
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
|
@ -1130,10 +1155,10 @@ require('lazy').setup({
|
||||||
additional_vim_regex_highlighting = { 'ruby' },
|
additional_vim_regex_highlighting = { 'ruby' },
|
||||||
},
|
},
|
||||||
indent = { enable = true, disable = { 'ruby' } },
|
indent = { enable = true, disable = { 'ruby' } },
|
||||||
-- custom_captures = {
|
custom_captures = {
|
||||||
-- -- Highlight the `return` keyword with the `ReturnKeyword` group
|
-- Highlight the `return` keyword with the `ReturnKeyword` group
|
||||||
-- ['@keyword.return'] = 'ReturnKeyword',
|
-- ['@keyword.return'] = 'ReturnKeyword',
|
||||||
-- },
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
|
|
|
@ -5,7 +5,10 @@ return {
|
||||||
event = { 'BufReadPre', 'BufNewFile' },
|
event = { 'BufReadPre', 'BufNewFile' },
|
||||||
config = function()
|
config = function()
|
||||||
local lint = require 'lint'
|
local lint = require 'lint'
|
||||||
lint.linters_by_ft = {}
|
lint.linters_by_ft = {
|
||||||
|
javascript = {},
|
||||||
|
typescript = {},
|
||||||
|
}
|
||||||
|
|
||||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||||
-- instead set linters_by_ft like this:
|
-- instead set linters_by_ft like this:
|
||||||
|
|
Loading…
Reference in New Issue