autoindent issue solved finally

This commit is contained in:
christianchiarulli 2021-07-25 23:28:47 -04:00
parent aa356858ef
commit e6f4b20346
4 changed files with 29 additions and 9 deletions

View file

@ -87,7 +87,7 @@ M.setup = function()
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", { expr = true }) vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", { expr = true })
vim.api.nvim_set_keymap("i", "<C-Space>", "compe#complete()", { noremap = true, silent = true, expr = true }) vim.api.nvim_set_keymap("i", "<C-Space>", "compe#complete()", { noremap = true, silent = true, expr = true })
vim.api.nvim_set_keymap("i", "<CR>", "compe#confirm('<CR>')", { noremap = true, silent = true, expr = true }) -- vim.api.nvim_set_keymap("i", "<CR>", "compe#confirm('<CR>')", { noremap = true, silent = true, expr = true })
vim.api.nvim_set_keymap("i", "<C-e>", "compe#close('<C-e>')", { noremap = true, silent = true, expr = true }) vim.api.nvim_set_keymap("i", "<C-e>", "compe#close('<C-e>')", { noremap = true, silent = true, expr = true })
vim.api.nvim_set_keymap("i", "<C-f>", "compe#scroll({ 'delta': +4 })", { noremap = true, silent = true, expr = true }) vim.api.nvim_set_keymap("i", "<C-f>", "compe#scroll({ 'delta': +4 })", { noremap = true, silent = true, expr = true })
vim.api.nvim_set_keymap("i", "<C-d>", "compe#scroll({ 'delta': -4 })", { noremap = true, silent = true, expr = true }) vim.api.nvim_set_keymap("i", "<C-d>", "compe#scroll({ 'delta': -4 })", { noremap = true, silent = true, expr = true })

View file

@ -18,7 +18,7 @@ M.config = function()
}, },
-- indent = {enable = true, disable = {"python", "html", "javascript"}}, -- indent = {enable = true, disable = {"python", "html", "javascript"}},
-- TODO seems to be broken -- TODO seems to be broken
indent = { enable = { "javascriptreact" } }, indent = { enable = true },
autotag = { enable = false }, autotag = { enable = false },
textobjects = { textobjects = {
swap = { swap = {

View file

@ -330,7 +330,7 @@ lvim.lang = {
}, },
html = { html = {
formatter = { formatter = {
exe = "", exe = "prettier",
args = {}, args = {},
}, },
linters = { linters = {

View file

@ -32,21 +32,46 @@ return {
}, },
-- Autocomplete -- Autocomplete
-- {
-- "hrsh7th/nvim-compe",
-- event = "InsertEnter",
-- config = function()
-- require("core.compe").setup()
-- if lvim.builtin.compe.on_config_done then
-- lvim.builtin.compe.on_config_done(require "compe")
-- end
-- end,
-- },
-- Completion & Snippets
{ {
"hrsh7th/nvim-compe", "hrsh7th/nvim-compe",
-- event = "InsertEnter", event = "InsertEnter",
config = function() config = function()
require("core.compe").setup() require("core.compe").setup()
if lvim.builtin.compe.on_config_done then if lvim.builtin.compe.on_config_done then
lvim.builtin.compe.on_config_done(require "compe") lvim.builtin.compe.on_config_done(require "compe")
end end
end, end,
wants = "vim-vsnip",
requires = {
{
"hrsh7th/vim-vsnip",
wants = "friendly-snippets",
event = "InsertCharPre",
},
{
"rafamadriz/friendly-snippets",
event = "InsertCharPre",
},
},
}, },
-- Autopairs -- Autopairs
{ {
"windwp/nvim-autopairs", "windwp/nvim-autopairs",
-- event = "InsertEnter", -- event = "InsertEnter",
after = "nvim-compe",
config = function() config = function()
require "core.autopairs" require "core.autopairs"
if lvim.builtin.autopairs.on_config_done then if lvim.builtin.autopairs.on_config_done then
@ -55,11 +80,6 @@ return {
end, end,
}, },
-- Snippets
{ "hrsh7th/vim-vsnip", event = "InsertEnter" },
{ "rafamadriz/friendly-snippets", event = "InsertEnter" },
-- Treesitter -- Treesitter
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",