summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugin_settings.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugin_settings.lua')
-rw-r--r--.config/nvim/lua/plugin_settings.lua135
1 files changed, 121 insertions, 14 deletions
diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua
index 60bbbe1..e9c4cd4 100644
--- a/.config/nvim/lua/plugin_settings.lua
+++ b/.config/nvim/lua/plugin_settings.lua
@@ -66,7 +66,7 @@ require'lualine'.setup {
66} 66}
67-- }}} requi -- 67-- }}} requi --
68 68
69-- Cutlass suite {{{1 -- 69-- cutlass suite {{{ --
70 70
71-- cutlass/yoink/subverse suite 71-- cutlass/yoink/subverse suite
72g.yoinkIncludeDeleteOperations = 1 72g.yoinkIncludeDeleteOperations = 1
@@ -85,7 +85,7 @@ g.clipboard = {
85 cache_enabled = 1, 85 cache_enabled = 1,
86} 86}
87 87
88-- 1}}} -- 88-- }}} cutlass suite --
89 89
90-- UltiSnips {{{ -- 90-- UltiSnips {{{ --
91opt.runtimepath:append('/home/yigit/.vim/my-snippets/') 91opt.runtimepath:append('/home/yigit/.vim/my-snippets/')
@@ -101,12 +101,6 @@ g.beacon_shrink = 1
101cmd('highlight Beacon guibg=red ctermbg=15') 101cmd('highlight Beacon guibg=red ctermbg=15')
102-- }}} beacon -- 102-- }}} beacon --
103 103
104-- vim-slime {{{ --
105g.slime_target = "tmux"
106g.slime_paste_file = "/home/yigit/.slime_paste"
107-- g.slime_default_config = {socket_name = get(split($TMUX, ","), 0), target_pane = "{last}"}
108-- }}} vim-slime --
109
110-- vimtex {{{ -- 104-- vimtex {{{ --
111g.vimtex_view_method = 'zathura' 105g.vimtex_view_method = 'zathura'
112g.vimtex_quickfix_mode = 0 106g.vimtex_quickfix_mode = 0
@@ -138,15 +132,20 @@ g.ledger_fillstring = ' -'
138require'nvim-web-devicons'.setup { 132require'nvim-web-devicons'.setup {
139 override = { 133 override = {
140 wiki = { 134 wiki = {
141 icon = "", 135 icon = "",
142 color = "#D7827E", 136 color = "#D7827E",
143 name = "vimwiki" 137 name = "vimwiki"
144 }, 138 },
145 rem = { 139 rem = {
146 icon = "", 140 icon = "",
147 color = "#B4637A", 141 color = "#B4637A",
148 name = "remind" 142 name = "remind"
149 } 143 },
144 mail = {
145 icon = "",
146 color = "#907AA9",
147 name = "mail"
148 },
150 }; 149 };
151 150
152 default = true 151 default = true
@@ -193,7 +192,115 @@ g.gutentags_ctags_exclude = {
193} 192}
194-- }}} gutentags -- 193-- }}} gutentags --
195 194
196-- float preview 195-- telescope {{{ --
196require('telescope').setup {
197 extensions = {
198 fzf = {
199 fuzzy = true, -- false will only do exact matching
200 override_generic_sorter = true, -- override the generic sorter
201 override_file_sorter = true, -- override the file sorter
202 case_mode = "smart_case", -- or "ignore_case" or "respect_case"
203 -- the default case_mode is "smart_case"
204 }
205 }
206}
207
208require('telescope').load_extension('fzf')
209-- }}} telescope --
210
211-- dashboard {{{ --
212g.dashboard_default_executive = 'telescope'
213g.dashboard_preview_command = 'cat'
214g.dashboard_preview_pipeline = 'lolcat'
215g.dashboard_preview_file = '~/.config/nvim/neovim.cat'
216g.dashboard_preview_file_height = 14
217g.dashboard_preview_file_width = 90
218-- }}} dashboard --
219
220-- treesitter {{{ --
221
222require'nvim-treesitter.configs'.setup {
223 ensure_installed = "maintained",
224 ignore_install = { "javascript" },
225 highlight = {
226 enable = true,
227 additional_vim_regex_highlighting = false,
228 },
229}
230-- }}} treesitter --
231
232-- nvim-cmp {{{ --
233local cmp = require'cmp'
234
235cmp.setup({
236 snippet = {
237 expand = function(args)
238 vim.fn["UltiSnips#Anon"](args.body)
239 end,
240 },
241 mapping = {
242 ['<C-d>'] = cmp.mapping.scroll_docs(-4),
243 ['<C-f>'] = cmp.mapping.scroll_docs(4),
244 ['<C-Space>'] = cmp.mapping.complete(),
245 ['<C-e>'] = cmp.mapping.close(),
246 ['<C-l>'] = cmp.mapping.confirm({ select = true }),
247 },
248 sources = {
249 { name = 'nvim_lsp' },
250 { name = 'ultisnips' },
251 { name = 'buffer' },
252 { name = "latex_symbols" },
253 }
254})
255
256-- }}} nvim-cmp --
257
258-- nvim-lsp {{{ --
259local nvim_lsp = require('lspconfig')
260
261local on_attach = function(client, bufnr)
262 local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
263 local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
264
265 -- Enable completion triggered by <c-x><c-o>
266 buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
267
268 -- Mappings.
269 local opts = { noremap=true, silent=true }
270
271 -- See `:help vim.lsp.*` for documentation on any of the below functions
272 buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
273 buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
274 buf_set_keymap('n', 'vh', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
275 buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
276 buf_set_keymap('n', 'vs', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
277 buf_set_keymap('n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
278 buf_set_keymap('n', '<leader>wd', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
279 buf_set_keymap('n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
280 buf_set_keymap('n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
281 buf_set_keymap('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
282 buf_set_keymap('n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
283 buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
284 buf_set_keymap('n', '<leader>d', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
285 buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
286 buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
287 buf_set_keymap('n', '<leader>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
288 buf_set_keymap('n', '<leader>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
289end
290
291local servers = { 'rust_analyzer', 'jedi_language_server', 'texlab' }
292for _, lsp in ipairs(servers) do
293 nvim_lsp[lsp].setup {
294 on_attach = on_attach,
295 flags = {
296 debounce_text_changes = 150,
297 },
298 capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
299 }
300end
301
302-- }}} nvim-lsp --
303
197g["float_preview#docked"] = 0 304g["float_preview#docked"] = 0
198 305
199-- highlight on yank 306-- highlight on yank