diff --git a/init.lua b/init.lua index 28bc55c..ef73c8c 100644 --- a/init.lua +++ b/init.lua @@ -49,3 +49,6 @@ vim.o.autoindent = true -- Undotree vim.cmd("packadd nvim.undotree") vim.keymap.set("n", "u", require("undotree").open) + +-- Local project config +vim.o.exrc = true diff --git a/lua/plugins/completion/conform.lua b/lua/plugins/completion/conform.lua index 968c990..95b1b2c 100644 --- a/lua/plugins/completion/conform.lua +++ b/lua/plugins/completion/conform.lua @@ -7,6 +7,7 @@ require("conform").setup({ formatters_by_ft = { lua = { "stylua" }, javascript = { "prettier" }, + typescriptreact = { "prettier" }, typescript = { "prettier" }, html = { "prettier" }, svelte = { "prettier" }, diff --git a/lua/plugins/completion/lspconfig.lua b/lua/plugins/completion/lspconfig.lua index e013675..4ebff05 100644 --- a/lua/plugins/completion/lspconfig.lua +++ b/lua/plugins/completion/lspconfig.lua @@ -18,22 +18,6 @@ vim.lsp.config("lua_ls", { }, }, }) --- vim.lsp.config("emmet_language_server", { --- -- capabilities = require("cmp_nvim_lsp").default_capabilities(), --- filetypes = { "html", "css", "javascriptreact", "typescriptreact" }, --- init_options = { --- preferences = {}, --- show_expanded_abbreviation = "always", --- show_abbreviation_suggestions = true, --- show_suggestions_as_snippets = true, --- html = { --- options = { --- ["bem.enabled"] = true, --- ["output.selfClosingStyle"] = "xhtml", --- }, --- }, --- }, --- }) vim.lsp.enable({ "lua_ls", "ts_ls", @@ -56,12 +40,23 @@ require("blink.cmp").setup({ }, completion = { + trigger = { + show_on_insert = true, + show_on_trigger_character = true, + show_on_backspace = true, + }, list = { selection = { preselect = false, auto_insert = true, }, }, + menu = { + auto_show = true, + border = "rounded", + min_width = 35, + auto_show_delay_ms = 100, + }, }, -- Keymaps