comparison .chezmoitemplates/init.lua @ 620:15c9da15a2f5

add telescope for vim.ui.select
author zegervdv <zegervdv@me.com>
date Fri, 29 Jul 2022 15:10:56 +0200
parents 6bd8aecfdaaa
children 817d54660c4f
comparison
equal deleted inserted replaced
619:6bd8aecfdaaa 620:15c9da15a2f5
437 }, 437 },
438 } 438 }
439 end, 439 end,
440 } 440 }
441 441
442 use {
443 'nvim-telescope/telescope-ui-select.nvim',
444 requires = { 'nvim-telescope/telescope.nvim' },
445 config = function()
446 require('telescope').setup {
447 defaults = {
448 border = {},
449 borderchars = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' },
450 winblend = 0,
451 },
452 extensions = {
453 ['ui-select'] = require('telescope.themes').get_dropdown {
454 border = {},
455 borderchars = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' },
456 winblend = 0,
457 },
458 },
459 }
460 require('telescope').load_extension 'ui-select'
461 end,
462 }
463
442 use { 'vimjas/vim-python-pep8-indent', ft = { 'python' } } 464 use { 'vimjas/vim-python-pep8-indent', ft = { 'python' } }
443 465
444 use { 466 use {
445 'rebelot/heirline.nvim', 467 'rebelot/heirline.nvim',
446 after = 'onedark.nvim', 468 after = 'onedark.nvim',
577 undercurl = false, 599 undercurl = false,
578 background = false, 600 background = false,
579 }, 601 },
580 } 602 }
581 require('onedark').load() 603 require('onedark').load()
604 local extras = {
605 TelescopeNormal = { link = 'Pmenu' },
606 TelescopeBorder = { link = 'Pmenu' },
607 TelescopePromptBorder = { link = 'Pmenu' },
608 TelescopePreviewBorder = { link = 'Pmenu' },
609 TelescopeResultsBorder = { link = 'Pmenu' },
610 TelescopeTitle = { link = 'identifier' },
611 }
612 for name, opt in pairs(extras) do
613 vim.api.nvim_set_hl(0, name, opt)
614 end
582 end, 615 end,
583 } 616 }
584 617
585 -- Terminal 618 -- Terminal
586 use { 619 use {
883 -- Automatic cursorline 916 -- Automatic cursorline
884 au.group('cline', { 917 au.group('cline', {
885 { 918 {
886 'WinEnter', 919 'WinEnter',
887 '*', 920 '*',
888 function() vim.opt_local.cursorline = true end, 921 function()
922 print(vim.bo.buftype)
923 if vim.bo.buftype ~= 'nofile' then vim.opt_local.cursorline = true end
924 end,
889 }, 925 },
890 { 926 {
891 'WinLeave', 927 'WinLeave',
892 '*', 928 '*',
893 function() vim.opt_local.cursorline = false end, 929 function() vim.opt_local.cursorline = false end,