fix: snippets

This commit is contained in:
Fabio Lenherr 2022-11-09 17:45:58 +01:00
parent 4cca98941e
commit 14c9fc6498
7 changed files with 50 additions and 26 deletions

View file

@ -26,7 +26,7 @@ luasnip.config.set_config({
},
})
vim.cmd('let g:snipMate = {"snippet_version" : 1 }')
--vim.cmd('let g:snipMate = {"snippet_version" : 1 }')
require("luasnip/loaders/from_vscode").lazy_load()
--require("luasnip.loaders.from_snipmate").lazy_load()
@ -147,17 +147,22 @@ cmp.setup({
sources = {
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "buffer" },
--{
-- name = "buffer",
-- option = {
-- keyword_pattern = [[\k\+]],
-- }
--},
{ name = "path" },
{
name = "spell",
option = {
keep_all_entries = false,
enable_in_context = function()
return true
end,
},
},
-- {
-- name = "spell",
-- option = {
-- keep_all_entries = false,
-- enable_in_context = function()
-- return true
-- end,
-- },
-- },
},
confirm_opts = {
behavior = cmp.ConfirmBehavior.Replace,

View file

@ -4,7 +4,6 @@ require("mason-null-ls").setup({
ensure_installed = {
"prettierd",
"clang_format",
"latexindent",
"shellharden",
"sql_formatter",
"fixjson",
@ -28,7 +27,6 @@ null_ls.setup({
},}
),
require("null-ls").builtins.formatting.clang_format,
require("null-ls").builtins.formatting.latexindent,
require("null-ls").builtins.formatting.shellharden,
require("null-ls").builtins.formatting.sql_formatter,
require("null-ls").builtins.formatting.fixjson,

View file

@ -3,6 +3,7 @@ local options = {
mouse = "a",
fileencoding = "utf-8",
relativenumber = true,
cursorline = false,
number = true,
smartindent = true,
smartcase = true,
@ -17,10 +18,10 @@ local options = {
expandtab = true, -- convert tabs to spaces
shiftwidth = 2, -- the number of spaces inserted for each indentation
tabstop = 2, -- insert 2 spaces for a tab
cursorline = true,
scrolloff = 8, -- is one of my fav
sidescrolloff = 8,
spell = true,
spell = false,
syntax = "off",
spelllang = "en_us",
mousemodel = "popup_setpos",
}

View file

@ -21,10 +21,10 @@ Plug("nvim-treesitter/nvim-treesitter",
{ ["do"] = vim.fn[":TSUpdate"] }) -- syntax colors
Plug("hrsh7th/nvim-cmp") -- completions
Plug("hrsh7th/cmp-nvim-lsp") -- lsp integration with completions
Plug("hrsh7th/cmp-buffer") -- buffer completion
--Plug("hrsh7th/cmp-buffer") -- buffer completion
Plug("hrsh7th/cmp-path") -- path completion
Plug("hrsh7th/cmp-cmdline") -- command completion
Plug("f3fora/cmp-spell") -- spelling completion
--Plug("f3fora/cmp-spell") -- spelling completion
Plug("saadparwaiz1/cmp_luasnip") -- snip completion
Plug("L3MON4D3/LuaSnip") -- snippet plugin
Plug("kyazdani42/nvim-tree.lua") -- file viewer on the right

View file

@ -5,8 +5,24 @@ end
require("nvim-treesitter.configs").setup({
-- A list of parser names, or "all"
ensure_installed = { "latex", "c", "cpp", "rust", "lua", "haskell", "java", "javascript", "typescript", "python", "html", "css",
"yaml", "bash", "json", "c_sharp"},
ensure_installed = {
"latex",
"c",
"cpp",
"rust",
"lua",
"haskell",
"java",
"javascript",
"typescript",
"python",
"html",
"css",
"yaml",
"bash",
"json",
"c_sharp",
},
highlight = {
enable = true,
additional_vim_regex_highlighting = false,