[nvim] filetype-lua update and nvim.lua cleanup

This commit is contained in:
Barak Michener 2024-01-09 13:32:30 -08:00
parent 2e87881195
commit fc663940ff
2 changed files with 66 additions and 82 deletions

View file

@ -124,6 +124,7 @@ autocmd FileType proto let b:auto_trim_whitespace=1
autocmd FileType hy let b:auto_trim_whitespace=1
autocmd FileType idris let b:auto_trim_whitespace=1
autocmd FileType java let b:auto_trim_whitespace=1
autocmd FileType lua let b:auto_trim_whitespace=1
augroup templates
autocmd BufNewFile *.vue 0r ~/.vim/skeletons/vue.skel

View file

@ -250,7 +250,8 @@ require('lspconfig').efm.setup(vim.tbl_extend('force', efmls_config, {
-- Enable diagnostics
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics,
diagnostic_options)
diagnostic_options
)
-- Compe setup
require 'compe'.setup {
@ -283,7 +284,7 @@ require 'compe'.setup {
--require'lsp_signature'.on_attach(signature_cfg)
saga_cfg = {
local saga_cfg = {
code_action_prompt = {
enable = false,
sign = false,
@ -317,6 +318,7 @@ _G.tab_complete = function()
return vim.fn['compe#complete']()
end
end
_G.s_tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-p>"
@ -482,25 +484,6 @@ require('telescope').setup {
}
local dropdown = require 'telescope.themes'.get_dropdown({
--previewer = false,
--prompt_title = "",
--results_height = 16,
--width = 0.6,
--borderchars = {
--{"─", "│", "─", "│", "╭", "╮", "╯", "╰"},
--prompt = {"─", "│", " ", "│", "╭", "╮", "│", "│"},
--results = {"─", "│", "─", "│", "├", "┤", "╯", "╰"},
--preview = {"─", "│", "─", "│", "╭", "╮", "╯", "╰"}
--},
--winblend = 10
})
local telescope_ivy = require 'telescope.themes'.get_ivy({
})
--
-- Treesitter
--
@ -607,7 +590,7 @@ function string.insert(str1, str2, pos)
end
function string.split(s, delimiter)
result = {};
local result = {};
for match in (s .. delimiter):gmatch("(.-)" .. delimiter) do
table.insert(result, match);
end