]> git.huck.website - nvim.git/commitdiff
help window autocommand
authorHuck Boles <huck@huck.website>
Wed, 19 Apr 2023 00:37:44 +0000 (19:37 -0500)
committerHuck Boles <huck@huck.website>
Wed, 19 Apr 2023 00:37:44 +0000 (19:37 -0500)
init.lua
lua/functions.lua [new file with mode: 0644]
lua/map.lua
lua/plugins.lua
lua/plugins/cmp.lua
lua/settings.lua

index 6641e8d157a2e3637adcaf8b40e3e68a7db58757..62d51f8db3aa9e70a96a73eaf4a499ebb8e1c5e8 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -35,4 +35,5 @@ require("lazy").setup("plugins", {
 
 require('settings')
 require('map')
+require('functions')
 require('theme')
diff --git a/lua/functions.lua b/lua/functions.lua
new file mode 100644 (file)
index 0000000..e7bb86f
--- /dev/null
@@ -0,0 +1,6 @@
+vim.api.nvim_create_autocmd("BufWinEnter", {
+    pattern = { "*.txt" },
+    callback = function() 
+        if vim.o.filetype == 'help' then vim.cmd.wincmd("L") end
+    end
+})
index 7edea0a1a30f344c61de445f6b85f5475efc24f1..a04ee37860cf306f2c8a042ebd81124964c52558 100644 (file)
@@ -2,7 +2,7 @@
 vim.keymap.set( 'n', '<leader>h', ":vsplit " )
 vim.keymap.set( 'n', '<leader>v', ":split " )
 vim.keymap.set( 'n', '<leader>t', ':tabnew ' )
-vim.keymap.set( 'n', '<leader>B', '<CMD>bnext<CR>' )
+vim.keymap.set( 'n', '<leader>b', '<CMD>bnext<CR>' )
 
 -- move through virtual lines
 vim.keymap.set( 'n', 'j', 'gj' )
index ac3c652f4799a2eb568b31601be046f0bc733df3..8df951018e9a46498c5247db66782cf3af182da2 100644 (file)
@@ -23,18 +23,11 @@ return {
     --     end
     -- },
 
-    {
-        'junegunn/fzf',
-        keys = {
-            { '<leader>H', "<CMD>call fzf#run({ 'sink': 'vertical botright split', 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true} })<CR>" },
-            { '<leader>V', "<CMD>call fzf#run({ 'sink': 'botright split', 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true}  })<CR>" },
-            {'<leader>T', "<CMD>call fzf#run({ 'sink': 'tabnew', 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true} })<CR>"},
-        },
-    },
-
     {
         'junegunn/fzf.vim',
-        dependencies = {'fzf'},
+        dependencies = {
+            'junegunn/fzf'
+        },
         keys = {
             { '<leader>f', '<CMD>GFiles<CR>' },
             { '<leader>F', '<CMD>Files<CR>' },
index 42bc60e768e3d98e7cf73f8df0fdd23fdab21891..5841a8ab833c09ed4491ed3ecd49bdf035020298 100644 (file)
@@ -22,9 +22,9 @@ return {
                     mapping = cmp.mapping.preset.insert({
                         ['<C-b>'] = cmp.mapping.scroll_docs(-4),
                         ['<C-f>'] = cmp.mapping.scroll_docs(4),
-                        ['<C-Space>'] = cmp.mapping.complete(),
-                        ['<C-e>'] = cmp.mapping.abort(),
-                        ['<CR>'] = cmp.mapping.confirm({ select = true }),
+                        ['<TAB>'] = cmp.mapping.complete(),
+                        ['<C-c>'] = cmp.mapping.abort(),
+                        ['<TAB>'] = cmp.mapping.confirm({ select = true }),
                     }),
                     sources = cmp.config.sources({
                         { name = 'nvim_lsp' },
index 25c57926b8fa6f9dad80adaceefe739393d8d992..310b5d358677ebee277810d38d18308fe9ccf787 100644 (file)
@@ -42,7 +42,7 @@ vim.o.expandtab = true
 vim.o.shiftround = true
 
 vim.o.showcmd = true
-vim.o.cmdheight = 1
+vim.o.cmdheight = 0
 vim.o.cmdwinheight = 10
 
 vim.o.backupdir = '/home/huck/.local/state/nvim/backup'