some changes
This commit is contained in:
parent
aeeec7a9e7
commit
6d311d4fbd
5 changed files with 20 additions and 130 deletions
|
|
@ -11,8 +11,8 @@ return {
|
|||
},
|
||||
{
|
||||
'saghen/blink.cmp',
|
||||
build = 'cargo build --release',
|
||||
dependencies = 'folke/lazydev.nvim',
|
||||
version = '1.*',
|
||||
dependencies = { 'folke/lazydev.nvim', 'L3MON4D3/LuaSnip' },
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
event = { 'InsertEnter', 'CmdlineEnter' },
|
||||
|
|
@ -80,109 +80,6 @@ return {
|
|||
keys = { { '<c-n>', mode = 'i' } },
|
||||
opts_extend = { 'sources.default' },
|
||||
},
|
||||
{
|
||||
'nvimtools/none-ls.nvim',
|
||||
config = function()
|
||||
local null_ls = require('null-ls')
|
||||
local builtins = null_ls.builtins
|
||||
local code_actions, diagnostics, formatting, hover =
|
||||
builtins.code_actions,
|
||||
builtins.diagnostics,
|
||||
builtins.formatting,
|
||||
builtins.hover
|
||||
|
||||
null_ls.setup({
|
||||
border = 'single',
|
||||
sources = {
|
||||
require('none-ls.code_actions.eslint_d'),
|
||||
code_actions.gitrebase,
|
||||
|
||||
diagnostics.buf,
|
||||
diagnostics.checkmake,
|
||||
require('none-ls.diagnostics.cpplint').with({
|
||||
extra_args = {
|
||||
'--filter',
|
||||
'-legal/copyright',
|
||||
'-whitespace/indent',
|
||||
},
|
||||
prepend_extra_args = true,
|
||||
}),
|
||||
require('none-ls.diagnostics.eslint_d'),
|
||||
diagnostics.hadolint,
|
||||
diagnostics.mypy.with({
|
||||
extra_args = { '--check-untyped-defs' },
|
||||
runtime_condition = function(params)
|
||||
return vim.fn.executable('mypy') == 1
|
||||
and require('null-ls.utils').path.exists(
|
||||
params.bufname
|
||||
)
|
||||
end,
|
||||
}),
|
||||
diagnostics.selene,
|
||||
diagnostics.vacuum,
|
||||
diagnostics.zsh,
|
||||
|
||||
formatting.black,
|
||||
formatting.isort.with({
|
||||
extra_args = { '--profile', 'black' },
|
||||
}),
|
||||
formatting.buf,
|
||||
formatting.cbfmt,
|
||||
formatting.cmake_format,
|
||||
require('none-ls.formatting.latexindent'),
|
||||
formatting.prettierd.with({
|
||||
env = {
|
||||
XDG_RUNTIME_DIR = vim.env.XDG_RUNTIME_DIR
|
||||
or (
|
||||
(
|
||||
vim.env.XDG_DATA_HOME
|
||||
or (vim.env.HOME .. '/.local/share')
|
||||
)
|
||||
.. '/prettierd'
|
||||
),
|
||||
},
|
||||
extra_args = function(params)
|
||||
if params.ft == 'jsonc' then
|
||||
return { '--trailing-comma', 'none' }
|
||||
end
|
||||
return {}
|
||||
end,
|
||||
filetypes = {
|
||||
'css',
|
||||
'graphql',
|
||||
'html',
|
||||
'javascript',
|
||||
'javascriptreact',
|
||||
'json',
|
||||
'jsonc',
|
||||
'markdown',
|
||||
'mdx',
|
||||
'typescript',
|
||||
'typescriptreact',
|
||||
'yaml',
|
||||
},
|
||||
}),
|
||||
formatting.shfmt.with({
|
||||
extra_args = { '-i', '2' },
|
||||
}),
|
||||
formatting.stylua.with({
|
||||
condition = function(utils)
|
||||
return utils.root_has_file({
|
||||
'stylua.toml',
|
||||
'.stylua.toml',
|
||||
})
|
||||
end,
|
||||
}),
|
||||
|
||||
hover.dictionary,
|
||||
hover.printenv,
|
||||
},
|
||||
on_attach = require('config.lsp').on_attach,
|
||||
debounce = 0,
|
||||
})
|
||||
end,
|
||||
dependencies = 'nvimtools/none-ls-extras.nvim',
|
||||
},
|
||||
{
|
||||
'b0o/SchemaStore.nvim',
|
||||
},
|
||||
|
|
@ -216,6 +113,7 @@ return {
|
|||
},
|
||||
{
|
||||
'yioneko/nvim-vtsls',
|
||||
enabled = false,
|
||||
config = function(_, opts)
|
||||
require('vtsls').config(opts)
|
||||
end,
|
||||
|
|
@ -284,6 +182,7 @@ return {
|
|||
},
|
||||
{
|
||||
'pmizio/typescript-tools.nvim',
|
||||
enabled = false,
|
||||
opts = {
|
||||
on_attach = function(_, bufnr)
|
||||
bmap(
|
||||
|
|
@ -344,6 +243,7 @@ return {
|
|||
},
|
||||
{
|
||||
'mrcjkb/rustaceanvim',
|
||||
enabled = false,
|
||||
ft = { 'rust' },
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue