This commit is contained in:
siduck76 2021-03-13 16:21:52 +05:30
parent a83f1196bc
commit b871162664
8 changed files with 9 additions and 23 deletions

View File

@ -1,5 +1,6 @@
vim.o.termguicolors = true
-- colors for active , inactive buffer tabs
require "bufferline".setup {
options = {
buffer_close_icon = "",

View File

View File

@ -1,22 +0,0 @@
vim.cmd [[ packadd nvim-lspconfig ]]
vim.cmd [[ packadd completion-nvim ]]
-- Enable(broadcasting) snippet capability for completion
local html_snippet_capabilities = vim.lsp.protocol.make_client_capabilities()
html_snippet_capabilities.textDocument.completion.completionItem.snippetSupport = true
require "lspconfig".html.setup {
on_attach = lsp_on_attach,
capabilities = html_snippet_capabilities,
cmd = {"html-languageserver", "--stdio"},
filetypes = {"html"},
init_opitons = {
configurationSection = {"html", "css", "javascript"},
embeddedLanguages = {
css = true,
javascript = true
}
}
}
vim.g.completion_enable_snippet = "UltiSnips"

View File

@ -43,6 +43,7 @@ _G.s_tab_complete = function()
end
end
-- mappings
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true})
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})

View File

@ -29,6 +29,7 @@ map("n", "[d", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
map("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
map("n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
-- lsp for html , css and js/ts
require "lspconfig".tsserver.setup {}
require "lspconfig".cssls.setup {}
require "lspconfig".html.setup {}

View File

@ -59,6 +59,8 @@ require("telescope").load_extension("media_files")
local opt = {noremap = true, silent = true}
vim.g.mapleader = " "
-- mappings
vim.api.nvim_set_keymap("n", "<Leader>ff", [[<Cmd>lua require('telescope.builtin').find_files()<CR>]], opt)
vim.api.nvim_set_keymap(
"n",

View File

@ -19,8 +19,11 @@ opt("o", "mouse", "a")
opt("w", "signcolumn", "yes")
opt("o", "cmdheight", 1)
opt("o", "updatetime", 250)
opt("o", "updatetime", 250) -- update interval for gitsigns
opt("o", "clipboard", "unnamedplus")
-- for indenline
opt("b", "expandtab", true )
opt("b", "shiftwidth", 2 )