X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;f=stow%2Fnvim%2F.config%2Fnvim%2Finit.lua;h=c4922ec27b5c8b157293f8e407ec2cf205f189ff;hb=HEAD;hp=ad43958029b3e6ed8f322e2d025c0444319f92e4;hpb=de86f98e9405905c21c82e9121fcdfc8f63c681b;p=dotfiles.git diff --git a/stow/nvim/.config/nvim/init.lua b/stow/nvim/.config/nvim/init.lua index ad43958..c4922ec 100644 --- a/stow/nvim/.config/nvim/init.lua +++ b/stow/nvim/.config/nvim/init.lua @@ -100,16 +100,8 @@ require('lazy').setup({ }, }, - { - -- Add indentation guides even on blank lines - 'lukas-reineke/indent-blankline.nvim', - -- Enable `lukas-reineke/indent-blankline.nvim` - -- See `:help indent_blankline.txt` - opts = { - char = '┊', - show_trailing_blankline_indent = false, - }, - }, + -- { dir = '~/github/mynvimplugins/btoggle.nvim/' }, + { 'tobser/btoggle.nvim' }, -- "gc" to comment visual regions/lines { 'numToStr/Comment.nvim', opts = {} }, @@ -160,7 +152,7 @@ require('lazy').setup({ -- See `:help vim.o` -- Set highlight on search -vim.o.hlsearch = false +vim.o.hlsearch = true -- Make line numbers default vim.wo.relativenumber = true @@ -276,13 +268,13 @@ augroup END require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim', 'html', - 'c_sharp', 'perl', 'python' }, + 'c_sharp', 'perl', 'bash', 'python' ,'markdown' }, -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, highlight = { enable = true }, - indent = { enable = true, disable = { 'python' } }, + indent = { enable = false, disable = { 'python' } }, incremental_selection = { enable = true, keymaps = { @@ -374,8 +366,6 @@ local on_attach = function(client, bufnr) nmap('ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') nmap('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') - - -- See `:help K` for why this keymap nmap('K', vim.lsp.buf.hover, 'Hover Documentation') nmap('', vim.lsp.buf.signature_help, 'Signature Documentation') @@ -439,6 +429,38 @@ mason_lspconfig.setup_handlers { end, } +-- require('lspconfig').perlls.setup { +-- settings = { +-- perl = { +-- perlInc = { +-- '/home/pi/git/misterhouse/lib', +-- '/home/pi/git/misterhouse/bin', +-- }, +-- }, +-- }, +-- capabilities = capabilities, +-- on_attach = on_attach, +-- } +-- +require('lspconfig').perlpls.setup { + on_attach = on_attach, + settings = { + perl = { + perlcritic = { + enabled = false + }, + syntax = { + enabled = true + }, + inc = { + '/home/pi/git/misterhouse/lib', + '/home/pi/git/misterhouse/bin', + }, + }, + }, + capabilities = capabilities, +} + -- nvim-cmp setup local cmp = require 'cmp' local luasnip = require 'luasnip' @@ -511,6 +533,7 @@ prettier.setup({ "javascriptreact", "json", "less", + "perl", "markdown", "scss", "typescript", @@ -523,5 +546,17 @@ vim.opt.diffopt = vim.opt.diffopt + "vertical" vim.opt.cursorline = true vim.opt.hlsearch = true +local bt = require("btoggle"); +bt.setup({ + ["true"] = "false", + ["True"] = "False", + ["False"] = "True", + ["false"] = "true", + ["foo"] = "bar", + ["bar"] = "bor", + ["bor"] = "foo" +}) +vim.keymap.set('n', 'b', bt.toggle) + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et