diff options
-rw-r--r-- | .config/nvim/after/ftplugin/ledger.vim | 2 | ||||
-rw-r--r-- | .config/nvim/lua/mappings.lua | 6 | ||||
-rw-r--r-- | .config/nvim/lua/plugin_settings.lua | 46 | ||||
-rw-r--r-- | .config/nvim/lua/plugins.lua | 9 | ||||
-rw-r--r-- | .config/nvim/my_snippets/ledger.snippets | 7 |
5 files changed, 53 insertions, 17 deletions
diff --git a/.config/nvim/after/ftplugin/ledger.vim b/.config/nvim/after/ftplugin/ledger.vim index 5785c35..022bcac 100644 --- a/.config/nvim/after/ftplugin/ledger.vim +++ b/.config/nvim/after/ftplugin/ledger.vim | |||
@@ -1,3 +1,3 @@ | |||
1 | let b:dispatch = 'ledger -f ~/nextcloud/ledger.ledger bal assets liab' | 1 | let b:dispatch = 'ledger -f ~/nextcloud/virtuals/ledger.ledger bal assets liab' |
2 | set foldmethod=expr | 2 | set foldmethod=expr |
3 | set foldexpr=nvim_treesitter#foldexpr() | 3 | set foldexpr=nvim_treesitter#foldexpr() |
diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua index 63eb045..6c17177 100644 --- a/.config/nvim/lua/mappings.lua +++ b/.config/nvim/lua/mappings.lua | |||
@@ -12,7 +12,6 @@ local function map(mode, lhs, rhs, opts) | |||
12 | vim.api.nvim_set_keymap(mode, lhs, rhs, options) | 12 | vim.api.nvim_set_keymap(mode, lhs, rhs, options) |
13 | end | 13 | end |
14 | 14 | ||
15 | -- local map = vim.api.nvim_set_keymap | ||
16 | local cmd = vim.cmd | 15 | local cmd = vim.cmd |
17 | local M = {} | 16 | local M = {} |
18 | 17 | ||
@@ -159,10 +158,13 @@ map('n', '<leader>fh', "<cmd>lua require('telescope.builtin').help_tags()<cr>") | |||
159 | map('n', '<F3>', ":Vista focus<cr>") | 158 | map('n', '<F3>', ":Vista focus<cr>") |
160 | map('n', '<F4>', ":Vista finder<cr>") | 159 | map('n', '<F4>', ":Vista finder<cr>") |
161 | 160 | ||
162 | 161 | -- dashboard | |
163 | map('n', '<Leader>fh', ':DashboardFindHistory<CR>') | 162 | map('n', '<Leader>fh', ':DashboardFindHistory<CR>') |
164 | map('n', '<Leader>ff', ':DashboardFindFile<CR>') | 163 | map('n', '<Leader>ff', ':DashboardFindFile<CR>') |
165 | map('n', '<Leader>fa', ':DashboardFindWord<CR>') | 164 | map('n', '<Leader>fa', ':DashboardFindWord<CR>') |
166 | map('n', '<Leader>fb', ':DashboardJumpMark<CR>') | 165 | map('n', '<Leader>fb', ':DashboardJumpMark<CR>') |
167 | map('n', '<Leader>cn', ':DashboardNewFile<CR>') | 166 | map('n', '<Leader>cn', ':DashboardNewFile<CR>') |
167 | |||
168 | -- toggle rose pine theme | ||
169 | map('n', 'cz', [[<cmd>lua require('rose-pine.functions').toggle_variant({'dawn', 'base'})<cr>]], { noremap = true, silent = true }) | ||
168 | -- }}} plug mappings -- | 170 | -- }}} plug mappings -- |
diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua index 63cb370..2986c64 100644 --- a/.config/nvim/lua/plugin_settings.lua +++ b/.config/nvim/lua/plugin_settings.lua | |||
@@ -32,31 +32,40 @@ g.vimwiki_hl_headers = 1 | |||
32 | 32 | ||
33 | local function lualine_spell() | 33 | local function lualine_spell() |
34 | if vim.wo.spell then | 34 | if vim.wo.spell then |
35 | return [[spell]] | 35 | return "spell" |
36 | else | 36 | else |
37 | return | 37 | return |
38 | end | 38 | end |
39 | end | 39 | end |
40 | 40 | ||
41 | local function lualine_spell_cond() | ||
42 | if vim.wo.spell then | ||
43 | return true | ||
44 | else | ||
45 | return false | ||
46 | end | ||
47 | end | ||
48 | |||
41 | require'lualine'.setup { | 49 | require'lualine'.setup { |
42 | options = { | 50 | options = { |
43 | lower = false, | ||
44 | icons_enabled = true, | 51 | icons_enabled = true, |
45 | theme = 'rose-pine', | 52 | theme = 'rose-pine', |
46 | section_separators = {'', ''}, | 53 | section_separators = { left = '', right = '' }, |
47 | component_separators = {'', ''}, | 54 | component_separators = { left = '', right = '' }, |
48 | disabled_filetypes = {} | ||
49 | }, | 55 | }, |
50 | sections = { | 56 | sections = { |
51 | lualine_a = {{'mode', lower = true}}, | 57 | lualine_a = {{'mode', fmt = string.lower}}, |
52 | lualine_b = {'branch', 'diff', {lualine_spell}}, | 58 | lualine_b = {'branch', 'diff', { |
59 | lualine_spell, | ||
60 | cond = lualine_spell_cond | ||
61 | }}, | ||
53 | lualine_c = {'filename'}, | 62 | lualine_c = {'filename'}, |
54 | lualine_x = {'encoding', 'fileformat', 'filetype'}, | 63 | lualine_x = {'encoding', 'fileformat', 'filetype'}, |
55 | lualine_y = {'progress'}, | 64 | lualine_y = {'progress'}, |
56 | lualine_z = { | 65 | lualine_z = { |
57 | 'location', { | 66 | 'location', { |
58 | 'diagnostics', | 67 | 'diagnostics', |
59 | sources = {'ale'}, | 68 | sources = {'nvim_lsp'}, |
60 | sections = {'error', 'warn', 'info', 'hint'}, | 69 | sections = {'error', 'warn', 'info', 'hint'}, |
61 | symbols = {error = 'e', warn = 'w', info = 'i', hint = 'h'} | 70 | symbols = {error = 'e', warn = 'w', info = 'i', hint = 'h'} |
62 | } | 71 | } |
@@ -70,7 +79,14 @@ require'lualine'.setup { | |||
70 | lualine_y = {}, | 79 | lualine_y = {}, |
71 | lualine_z = {} | 80 | lualine_z = {} |
72 | }, | 81 | }, |
73 | tabline = {}, | 82 | tabline = { |
83 | lualine_a = {'buffers'}, | ||
84 | lualine_b = {}, | ||
85 | lualine_c = {}, | ||
86 | lualine_x = {}, | ||
87 | lualine_y = {}, | ||
88 | lualine_z = {'tabs'} | ||
89 | }, | ||
74 | extensions = {} | 90 | extensions = {} |
75 | } | 91 | } |
76 | 92 | ||
@@ -102,7 +118,7 @@ g.UltiSnipsEditSplit = "vertical" | |||
102 | -- ctrl + l expands the snippet, c + j/k navigates placeholders | 118 | -- ctrl + l expands the snippet, c + j/k navigates placeholders |
103 | g.UltiSnipsExpandTrigger = "<C-l>" | 119 | g.UltiSnipsExpandTrigger = "<C-l>" |
104 | g.UltiSnipsEnableSnipMate = "1" | 120 | g.UltiSnipsEnableSnipMate = "1" |
105 | g.UltiSnipsSnippetDirectories = {"my_snippets"} | 121 | g.UltiSnipsSnippetDirectories = {"my_snippets", "UltiSnips"} |
106 | -- }}} UltiSnips -- | 122 | -- }}} UltiSnips -- |
107 | 123 | ||
108 | -- beacon {{{ -- | 124 | -- beacon {{{ -- |
@@ -341,3 +357,13 @@ g.vista_icon_indent = {"╰ ", "│ "} | |||
341 | g["float_preview#docked"] = 0 | 357 | g["float_preview#docked"] = 0 |
342 | -- }}} float-preview.nvim -- | 358 | -- }}} float-preview.nvim -- |
343 | 359 | ||
360 | -- indent-blankline {{{ -- | ||
361 | vim.opt.list = true | ||
362 | |||
363 | require("indent_blankline").setup { | ||
364 | show_current_context = true, | ||
365 | char = "┊", | ||
366 | buftype_exclude = {"terminal"}, | ||
367 | filetype_exclude = {"dashboard", "help", "ledger"} | ||
368 | } | ||
369 | -- }}} indent-blankline -- | ||
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 93a5aa2..c9b6a7c 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua | |||
@@ -8,18 +8,17 @@ | |||
8 | return require('packer').startup(function() | 8 | return require('packer').startup(function() |
9 | -- packer can manage itself | 9 | -- packer can manage itself |
10 | use 'wbthomason/packer.nvim' | 10 | use 'wbthomason/packer.nvim' |
11 | |||
11 | -- latex suite | 12 | -- latex suite |
12 | use {'lervag/vimtex', ft = {'tex', 'latex', 'plaintext'}} | 13 | use {'lervag/vimtex', ft = {'tex', 'latex', 'plaintext'}} |
13 | 14 | ||
14 | -- treesitter... | 15 | -- treesitter |
15 | use { | 16 | use { |
16 | 'nvim-treesitter/nvim-treesitter', | 17 | 'nvim-treesitter/nvim-treesitter', |
17 | run = ':TSUpdate' | 18 | run = ':TSUpdate' |
18 | } | 19 | } |
19 | |||
20 | -- quickstart lsp config | 20 | -- quickstart lsp config |
21 | use 'neovim/nvim-lspconfig' | 21 | use 'neovim/nvim-lspconfig' |
22 | |||
23 | -- dashboard | 22 | -- dashboard |
24 | use 'glepnir/dashboard-nvim' | 23 | use 'glepnir/dashboard-nvim' |
25 | 24 | ||
@@ -51,6 +50,8 @@ return require('packer').startup(function() | |||
51 | use 'airblade/vim-gitgutter' | 50 | use 'airblade/vim-gitgutter' |
52 | -- completion preview of floating window | 51 | -- completion preview of floating window |
53 | use 'ncm2/float-preview.nvim' | 52 | use 'ncm2/float-preview.nvim' |
53 | -- indent guides | ||
54 | use "lukas-reineke/indent-blankline.nvim" | ||
54 | 55 | ||
55 | -- language packs | 56 | -- language packs |
56 | use "nathom/filetype.nvim" | 57 | use "nathom/filetype.nvim" |
@@ -126,7 +127,7 @@ return require('packer').startup(function() | |||
126 | 127 | ||
127 | -- cursorline of the $CURRENT_YEAR | 128 | -- cursorline of the $CURRENT_YEAR |
128 | use { | 129 | use { |
129 | 'hoob3rt/lualine.nvim', | 130 | 'shadmansaleh/lualine.nvim', |
130 | requires = {'kyazdani42/nvim-web-devicons', opt = true} | 131 | requires = {'kyazdani42/nvim-web-devicons', opt = true} |
131 | } | 132 | } |
132 | -- colour theme of the $CURRENT_YEAR | 133 | -- colour theme of the $CURRENT_YEAR |
diff --git a/.config/nvim/my_snippets/ledger.snippets b/.config/nvim/my_snippets/ledger.snippets index a8c4eb0..098a767 100644 --- a/.config/nvim/my_snippets/ledger.snippets +++ b/.config/nvim/my_snippets/ledger.snippets | |||
@@ -30,3 +30,10 @@ ${1:`!v strftime("%Y")`}-${2:`!v strftime("%m")`}-${3:`!v strftime("%d")`} Migro | |||
30 | Expenses:Food:Groceries ${4:0.00} TL | 30 | Expenses:Food:Groceries ${4:0.00} TL |
31 | ${5:Assets:Maas}$0 | 31 | ${5:Assets:Maas}$0 |
32 | endsnippet | 32 | endsnippet |
33 | |||
34 | snippet sb "New Sosyal Bina Transaction" b | ||
35 | ${1:`!v strftime("%Y")`}-${2:`!v strftime("%m")`}-${3:`!v strftime("%d")`} Sosyal Bina | ||
36 | Expenses:Food:Lunch 8.60 TL | ||
37 | Assets:Maas$0 | ||
38 | endsnippet | ||
39 | |||