move old setups to plugins dir
This commit is contained in:
parent
274e567d83
commit
f84576f525
|
@ -1 +0,0 @@
|
||||||
require("bufferline").setup{}
|
|
|
@ -1,32 +0,0 @@
|
||||||
local lsp_capabilities = require("cmp_nvim_lsp").default_capabilities()
|
|
||||||
local lspconfig = require('lspconfig')
|
|
||||||
require("mason").setup()
|
|
||||||
require("mason-lspconfig").setup {
|
|
||||||
-- ensure_installed = { "lua_ls", "grammarly", "ltex" },
|
|
||||||
}
|
|
||||||
lspconfig.lua_ls.setup {
|
|
||||||
capabilities = lsp_capabilities,
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
diagnostics = {
|
|
||||||
globals = { "vim" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
-- lspconfig.ltex.setup {
|
|
||||||
-- capabilities = lsp_capabilities,
|
|
||||||
-- }
|
|
||||||
-- lspconfig.grammarly.setup {
|
|
||||||
-- capabilities = lsp_capabilities,
|
|
||||||
-- filetypes = { "markdown", "tex", "text", },
|
|
||||||
-- init_options = {
|
|
||||||
-- clientId = "client_"
|
|
||||||
-- },
|
|
||||||
-- root_dir = function(fname)
|
|
||||||
-- return require'lspconfig'.util.find_git_ancestor(fname) or vim.loop.os_homedir()
|
|
||||||
-- end,
|
|
||||||
-- }
|
|
||||||
-- require("lspconfig").marksman.setup {
|
|
||||||
-- capabilities = lsp_capabilities,
|
|
||||||
-- }
|
|
|
@ -1,8 +0,0 @@
|
||||||
local function getWords()
|
|
||||||
return tostring(vim.fn.wordcount().words)
|
|
||||||
end
|
|
||||||
require('lualine').setup {
|
|
||||||
sections = {
|
|
||||||
lualine_z = { getWords },
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
|
|
||||||
require("neo-tree").setup({})
|
|
|
@ -1,85 +0,0 @@
|
||||||
vim.opt.completeopt = {'menu', 'menuone', 'noselect'}
|
|
||||||
local cmp = require('cmp')
|
|
||||||
local luasnip = require('luasnip')
|
|
||||||
local select_opts = {behavior = cmp.SelectBehavior.Select}
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body)
|
|
||||||
end
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
{name = 'path'},
|
|
||||||
{name = 'nvim_lsp', keyword_length = 1},
|
|
||||||
{name = 'buffer', keyword_length = 3},
|
|
||||||
{name = 'luasnip', keyword_length = 2},
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
documentation = cmp.config.window.bordered()
|
|
||||||
},
|
|
||||||
formatting = {
|
|
||||||
fields = {'menu', 'abbr', 'kind'},
|
|
||||||
format = function(entry, item)
|
|
||||||
local menu_icon = {
|
|
||||||
nvim_lsp = 'λ',
|
|
||||||
luasnip = '⋗',
|
|
||||||
buffer = 'Ω',
|
|
||||||
path = '🖫',
|
|
||||||
}
|
|
||||||
|
|
||||||
item.menu = menu_icon[entry.source.name]
|
|
||||||
return item
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = {
|
|
||||||
['<Up>'] = cmp.mapping.select_prev_item(select_opts),
|
|
||||||
['<Down>'] = cmp.mapping.select_next_item(select_opts),
|
|
||||||
|
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(select_opts),
|
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(select_opts),
|
|
||||||
|
|
||||||
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
|
|
||||||
['<C-e>'] = cmp.mapping.abort(),
|
|
||||||
['<C-y>'] = cmp.mapping.confirm({select = true}),
|
|
||||||
['<CR>'] = cmp.mapping.confirm({select = false}),
|
|
||||||
|
|
||||||
['<C-f>'] = cmp.mapping(function(fallback)
|
|
||||||
if luasnip.jumpable(1) then
|
|
||||||
luasnip.jump(1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {'i', 's'}),
|
|
||||||
|
|
||||||
['<C-b>'] = cmp.mapping(function(fallback)
|
|
||||||
if luasnip.jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {'i', 's'}),
|
|
||||||
|
|
||||||
['<Tab>'] = cmp.mapping(function(fallback)
|
|
||||||
local col = vim.fn.col('.') - 1
|
|
||||||
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item(select_opts)
|
|
||||||
elseif col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then
|
|
||||||
fallback()
|
|
||||||
else
|
|
||||||
cmp.complete()
|
|
||||||
end
|
|
||||||
end, {'i', 's'}),
|
|
||||||
|
|
||||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item(select_opts)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {'i', 's'}),
|
|
||||||
},
|
|
||||||
})
|
|
|
@ -1,9 +0,0 @@
|
||||||
require('lint').linters_by_ft = {
|
|
||||||
markdown = {'proselint',}
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
|
||||||
callback = function()
|
|
||||||
require("lint").try_lint()
|
|
||||||
end,
|
|
||||||
})
|
|
|
@ -1,3 +0,0 @@
|
||||||
require('toggle_lsp_diagnostics').init({
|
|
||||||
start_on = false,
|
|
||||||
})
|
|
Loading…
Reference in New Issue