summaryrefslogtreecommitdiffstats
path: root/.config/nvim
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/after/ftplugin/ledger.vim2
-rw-r--r--.config/nvim/lua/mappings.lua6
-rw-r--r--.config/nvim/lua/plugin_settings.lua46
-rw-r--r--.config/nvim/lua/plugins.lua9
-rw-r--r--.config/nvim/my_snippets/ledger.snippets7
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 @@
1let b:dispatch = 'ledger -f ~/nextcloud/ledger.ledger bal assets liab' 1let b:dispatch = 'ledger -f ~/nextcloud/virtuals/ledger.ledger bal assets liab'
2set foldmethod=expr 2set foldmethod=expr
3set foldexpr=nvim_treesitter#foldexpr() 3set 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)
13end 13end
14 14
15-- local map = vim.api.nvim_set_keymap
16local cmd = vim.cmd 15local cmd = vim.cmd
17local M = {} 16local M = {}
18 17
@@ -159,10 +158,13 @@ map('n', '<leader>fh', "<cmd>lua require('telescope.builtin').help_tags()<cr>")
159map('n', '<F3>', ":Vista focus<cr>") 158map('n', '<F3>', ":Vista focus<cr>")
160map('n', '<F4>', ":Vista finder<cr>") 159map('n', '<F4>', ":Vista finder<cr>")
161 160
162 161-- dashboard
163map('n', '<Leader>fh', ':DashboardFindHistory<CR>') 162map('n', '<Leader>fh', ':DashboardFindHistory<CR>')
164map('n', '<Leader>ff', ':DashboardFindFile<CR>') 163map('n', '<Leader>ff', ':DashboardFindFile<CR>')
165map('n', '<Leader>fa', ':DashboardFindWord<CR>') 164map('n', '<Leader>fa', ':DashboardFindWord<CR>')
166map('n', '<Leader>fb', ':DashboardJumpMark<CR>') 165map('n', '<Leader>fb', ':DashboardJumpMark<CR>')
167map('n', '<Leader>cn', ':DashboardNewFile<CR>') 166map('n', '<Leader>cn', ':DashboardNewFile<CR>')
167
168-- toggle rose pine theme
169map('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
33local function lualine_spell() 33local 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
39end 39end
40 40
41local function lualine_spell_cond()
42 if vim.wo.spell then
43 return true
44 else
45 return false
46 end
47end
48
41require'lualine'.setup { 49require'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
103g.UltiSnipsExpandTrigger = "<C-l>" 119g.UltiSnipsExpandTrigger = "<C-l>"
104g.UltiSnipsEnableSnipMate = "1" 120g.UltiSnipsEnableSnipMate = "1"
105g.UltiSnipsSnippetDirectories = {"my_snippets"} 121g.UltiSnipsSnippetDirectories = {"my_snippets", "UltiSnips"}
106-- }}} UltiSnips -- 122-- }}} UltiSnips --
107 123
108-- beacon {{{ -- 124-- beacon {{{ --
@@ -341,3 +357,13 @@ g.vista_icon_indent = {"╰ ", "│ "}
341g["float_preview#docked"] = 0 357g["float_preview#docked"] = 0
342-- }}} float-preview.nvim -- 358-- }}} float-preview.nvim --
343 359
360-- indent-blankline {{{ --
361vim.opt.list = true
362
363require("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 @@
8return require('packer').startup(function() 8return 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
32endsnippet 32endsnippet
33
34snippet 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
38endsnippet
39