From 7dc6a2759f779fc9bc6f0f080bc06a7d412acc19 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Tue, 11 Jun 2024 19:34:23 +0200 Subject: Plugin Konfiguration überarbeitet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nvim/ftplugin/vim.vim | 7 +++++++ nvim/plugins.vim | 46 +++++++++++++++++++++++++++++++++++----------- 2 files changed, 42 insertions(+), 11 deletions(-) (limited to 'nvim') diff --git a/nvim/ftplugin/vim.vim b/nvim/ftplugin/vim.vim index a525fe2..a67d39a 100644 --- a/nvim/ftplugin/vim.vim +++ b/nvim/ftplugin/vim.vim @@ -1 +1,8 @@ lua vim.treesitter.start() + +setlocal tabstop=2 +setlocal softtabstop=2 +setlocal shiftwidth=2 +setlocal smarttab +setlocal expandtab +setlocal autoindent diff --git a/nvim/plugins.vim b/nvim/plugins.vim index 2f785a6..61d71f8 100644 --- a/nvim/plugins.vim +++ b/nvim/plugins.vim @@ -87,7 +87,7 @@ lspconfig.clangd.setup{ capabilities = capabilities } -lspconfig.lua_ls.setup { +lspconfig.lua_ls.setup{ settings = { Lua = { runtime = { @@ -127,13 +127,25 @@ lspconfig.jsonls.setup{ capabilities = capabilities } +lspconfig.angularls.setup{ + capabilities = capabilities, +} + +lspconfig.markdown_oxide.setup{ + capabilities = capabilities, + on_attach = on_attach, + cmd = { + 'markdown-oxide' + } +} + require('gitsigns').setup() require("luasnip.loaders.from_vscode").lazy_load() local cmp = require('cmp') -cmp.setup({ +cmp.setup{ snippet = { expand = function(args) require('luasnip').lsp_expand(args.body) @@ -143,20 +155,32 @@ cmp.setup({ completion = cmp.config.window.bordered(), documentation = cmp.config.window.bordered(), }, - mapping = cmp.mapping.preset.insert({ + mapping = cmp.mapping.preset.insert{ [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete(), [''] = cmp.mapping.abort(), [''] = cmp.mapping.confirm({ select = true }), - }), - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - }, { - { name = 'buffer' }, - }) -}) + }, + sources = cmp.config.sources{ + { + name = 'nvim_lsp', + option = { + markdown_oxide = { + keyword_pattern = [[\(\k\| \|\/\|#\)\+]] + } + } + }, + { + name = 'luasnip' + }, + }, + { + { + name = 'buffer' + }, + } +} local cmp_autopairs = require('nvim-autopairs.completion.cmp') cmp.event:on( -- cgit v1.3