diff options
Diffstat (limited to '.config/nvim/lua/plugin_settings.lua')
| -rw-r--r-- | .config/nvim/lua/plugin_settings.lua | 174 |
1 files changed, 135 insertions, 39 deletions
diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua index d03ad77..d103607 100644 --- a/.config/nvim/lua/plugin_settings.lua +++ b/.config/nvim/lua/plugin_settings.lua | |||
| @@ -94,14 +94,7 @@ require'lualine'.setup { | |||
| 94 | lualine_y = {}, | 94 | lualine_y = {}, |
| 95 | lualine_z = {} | 95 | lualine_z = {} |
| 96 | }, | 96 | }, |
| 97 | tabline = { | 97 | tabline = {}, |
| 98 | lualine_a = {'buffers'}, | ||
| 99 | lualine_b = {}, | ||
| 100 | lualine_c = {}, | ||
| 101 | lualine_x = {}, | ||
| 102 | lualine_y = {}, | ||
| 103 | lualine_z = {} | ||
| 104 | }, | ||
| 105 | extensions = {} | 98 | extensions = {} |
| 106 | } | 99 | } |
| 107 | 100 | ||
| @@ -454,37 +447,6 @@ npairs.add_rule(Rule('/*','*/',"c")) | |||
| 454 | 447 | ||
| 455 | -- }}} nvim-autopairs -- | 448 | -- }}} nvim-autopairs -- |
| 456 | 449 | ||
| 457 | -- nvim-tree {{{ -- | ||
| 458 | |||
| 459 | require("nvim-tree").setup({ | ||
| 460 | sort_by = "case_sensitive", | ||
| 461 | diagnostics = { | ||
| 462 | enable = false, | ||
| 463 | icons = { | ||
| 464 | hint = "❔", | ||
| 465 | info = "❕", | ||
| 466 | warning = "❗", | ||
| 467 | error = "❌", | ||
| 468 | } | ||
| 469 | }, | ||
| 470 | view = { | ||
| 471 | adaptive_size = true, | ||
| 472 | mappings = { | ||
| 473 | list = { | ||
| 474 | { key = "u", action = "dir_up" }, | ||
| 475 | }, | ||
| 476 | }, | ||
| 477 | }, | ||
| 478 | renderer = { | ||
| 479 | group_empty = true, | ||
| 480 | }, | ||
| 481 | filters = { | ||
| 482 | dotfiles = true, | ||
| 483 | }, | ||
| 484 | }) | ||
| 485 | |||
| 486 | -- }}} nvim-tree -- | ||
| 487 | |||
| 488 | -- nvim-colorizer {{{ -- | 450 | -- nvim-colorizer {{{ -- |
| 489 | require 'colorizer'.setup() | 451 | require 'colorizer'.setup() |
| 490 | -- }}} nvim-colorizer -- | 452 | -- }}} nvim-colorizer -- |
| @@ -640,3 +602,137 @@ require("fidget").setup{ | |||
| 640 | } | 602 | } |
| 641 | -- }}} fidget.nvim -- | 603 | -- }}} fidget.nvim -- |
| 642 | 604 | ||
| 605 | -- nvim-tree {{{ -- | ||
| 606 | |||
| 607 | require("nvim-tree").setup({ | ||
| 608 | sort_by = "case_sensitive", | ||
| 609 | diagnostics = { | ||
| 610 | enable = false, | ||
| 611 | icons = { | ||
| 612 | hint = "❔", | ||
| 613 | info = "❕", | ||
| 614 | warning = "❗", | ||
| 615 | error = "❌", | ||
| 616 | } | ||
| 617 | }, | ||
| 618 | view = { | ||
| 619 | adaptive_size = true, | ||
| 620 | mappings = { | ||
| 621 | list = { | ||
| 622 | { key = "u", action = "dir_up" }, | ||
| 623 | }, | ||
| 624 | }, | ||
| 625 | }, | ||
| 626 | renderer = { | ||
| 627 | group_empty = true, | ||
| 628 | }, | ||
| 629 | filters = { | ||
| 630 | dotfiles = true, | ||
| 631 | }, | ||
| 632 | }) | ||
| 633 | |||
| 634 | -- }}} nvim-tree -- | ||
| 635 | |||
| 636 | -- barbar.nvim {{{ -- | ||
| 637 | |||
| 638 | require'bufferline'.setup { | ||
| 639 | -- disable animations | ||
| 640 | animation = false, | ||
| 641 | |||
| 642 | -- auto-hide the tab bar when there is a single buffer | ||
| 643 | auto_hide = true, | ||
| 644 | |||
| 645 | -- enable current/total tabpages indicator (top right corner) | ||
| 646 | tabpages = true, | ||
| 647 | |||
| 648 | -- enable close button | ||
| 649 | closable = true, | ||
| 650 | |||
| 651 | -- disable clickable tabs | ||
| 652 | clickable = false, | ||
| 653 | |||
| 654 | -- Enables / disables diagnostic symbols | ||
| 655 | diagnostics = { | ||
| 656 | -- `vim.diagnostic.severity` | ||
| 657 | [vim.diagnostic.severity.ERROR] = {enabled = true, icon = '❌'}, | ||
| 658 | [vim.diagnostic.severity.WARN] = {enabled = false}, | ||
| 659 | [vim.diagnostic.severity.INFO] = {enabled = false}, | ||
| 660 | [vim.diagnostic.severity.HINT] = {enabled = true}, | ||
| 661 | }, | ||
| 662 | |||
| 663 | -- -- Excludes buffers from the tabline | ||
| 664 | -- exclude_ft = {'javascript'}, | ||
| 665 | -- exclude_name = {'package.json'}, | ||
| 666 | |||
| 667 | -- Hide inactive buffers and file extensions. Other options are `current` and `visible` | ||
| 668 | -- hide = {extensions = true, inactive = true}, | ||
| 669 | |||
| 670 | -- Enable/disable icons | ||
| 671 | -- if set to 'numbers', will show buffer index in the tabline | ||
| 672 | -- if set to 'both', will show buffer index and icons in the tabline | ||
| 673 | icons = true, | ||
| 674 | |||
| 675 | -- If set, the icon color will follow its corresponding buffer | ||
| 676 | -- highlight group. By default, the Buffer*Icon group is linked to the | ||
| 677 | -- Buffer* group (see Highlighting below). Otherwise, it will take its | ||
| 678 | -- default value as defined by devicons. | ||
| 679 | icon_custom_colors = false, | ||
| 680 | |||
| 681 | -- Configure icons on the bufferline. | ||
| 682 | icon_separator_active = '▎', | ||
| 683 | icon_separator_inactive = '▎', | ||
| 684 | icon_close_tab = '', | ||
| 685 | icon_close_tab_modified = '•', | ||
| 686 | icon_pinned = '車', | ||
| 687 | |||
| 688 | -- If true, new buffers will be inserted at the start/end of the list. | ||
| 689 | -- Default is to insert after current buffer. | ||
| 690 | insert_at_end = false, | ||
| 691 | insert_at_start = false, | ||
| 692 | |||
| 693 | -- Sets the maximum padding width with which to surround each tab | ||
| 694 | maximum_padding = 1, | ||
| 695 | |||
| 696 | -- Sets the minimum padding width with which to surround each tab | ||
| 697 | minimum_padding = 1, | ||
| 698 | |||
| 699 | -- Sets the maximum buffer name length. | ||
| 700 | maximum_length = 30, | ||
| 701 | |||
| 702 | -- If set, the letters for each buffer in buffer-pick mode will be | ||
| 703 | -- assigned based on their name. Otherwise or in case all letters are | ||
| 704 | -- already assigned, the behavior is to assign letters in order of | ||
| 705 | -- usability (see order below) | ||
| 706 | semantic_letters = true, | ||
| 707 | |||
| 708 | -- New buffer letters are assigned in this order. This order is | ||
| 709 | -- optimal for the qwerty keyboard layout but might need adjustement | ||
| 710 | -- for other layouts. | ||
| 711 | -- letters = 'asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP', | ||
| 712 | letters = 'arstneoidhqwfpluy;zxcvkmARSTNEOIDHQWFPLUYZXCVKM', | ||
| 713 | |||
| 714 | -- Sets the name of unnamed buffers. By default format is "[Buffer X]" | ||
| 715 | -- where X is the buffer number. But only a static string is accepted here. | ||
| 716 | no_name_title = nil, | ||
| 717 | } | ||
| 718 | |||
| 719 | local nvim_tree_events = require('nvim-tree.events') | ||
| 720 | local bufferline_api = require('bufferline.api') | ||
| 721 | |||
| 722 | local function get_tree_size() | ||
| 723 | return require'nvim-tree.view'.View.width | ||
| 724 | end | ||
| 725 | |||
| 726 | nvim_tree_events.subscribe('TreeOpen', function() | ||
| 727 | bufferline_api.set_offset(get_tree_size()) | ||
| 728 | end) | ||
| 729 | |||
| 730 | nvim_tree_events.subscribe('Resize', function() | ||
| 731 | bufferline_api.set_offset(get_tree_size()) | ||
| 732 | end) | ||
| 733 | |||
| 734 | nvim_tree_events.subscribe('TreeClose', function() | ||
| 735 | bufferline_api.set_offset(0) | ||
| 736 | end) | ||
| 737 | |||
| 738 | -- }}} barbar.nvim -- | ||
