aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/ui.lua
blob: 45a1d3baad752e2ec4af7583222458ef9fae3dfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
return {

  {
    "Mofiqul/vscode.nvim",
    priority = 1000, -- wichtig: vor anderen UI-Plugins laden
    lazy = false,
    config = function()
      local vscode = require("vscode")

      vscode.setup({
        style = "dark",
        transparent = false,
        italic_comments = true,
        underline_links = true,
        disable_nvimtree_bg = true,
      })

      vscode.load()
    end,
  },

  {
    "nvim-tree/nvim-tree.lua",
    dependencies = {
      "nvim-tree/nvim-web-devicons",
    },
    cmd = { "NvimTreeToggle", "NvimTreeOpen" },
    keys = {
      { "<leader>e", "<cmd>NvimTreeToggle<cr>", desc = "Explorer toggle" },
    },
    config = function()
      require("nvim-tree").setup({
        update_focused_file = {
          enable = true,
          update_root = false,
          ignore_list = {},
        },
        view = {
          width = 30,
        },
        renderer = {
          highlight_git = true,
          icons = {
            show = {
              file = true,
              folder = true,
              git = true,
            },
          },
        },
        filters = {
          dotfiles = false,
        },
      })
    end,
  },

  {
    "RRethy/vim-illuminate",
    event = "BufReadPost",
  },

  {
    "mattn/calendar-vim",
    ft = "taskedit",
    config = function()
      function _G.CalendarInsertDate(day, month, year)
        local date = string.format("%04d-%02d-%02d", year, month, day)

        vim.cmd("wincmd q")
        vim.cmd("wincmd p")

        local row, col = unpack(vim.api.nvim_win_get_cursor(0))
        local line = vim.api.nvim_get_current_line()

        for s, _, e in line:gmatch("()(%d%d%d%d%-%d%d%-%d%d)()") do
          if col + 1 >= s and col + 1 <= e - 1 then
            vim.api.nvim_buf_set_text(0, row - 1, s - 1, row - 1, e - 1, { date })
            return
          end
        end

        vim.api.nvim_put({ date }, "c", true, true)
      end

      vim.g.calendar_action = "v:lua.CalendarInsertDate"

      vim.g.calendar_monday = 1
      vim.g.calendar_wruler = "So Mo Di Mi Do Fr Sa"
      vim.g.calendar_mruler = "Jan,Feb,Mär,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Dez"
      vim.g.calendar_weeknm = 4
      vim.g.calendar_number_of_months = 5
    end,
  },
}