all repos — dotfiles @ 490080c7e4b6e71de6e675d98d3bd44d8ea31907

linux dotfiles

nvim: add some keymaps and remove tree-sitter for now
Prithu Goswami pg@prithu.dev
Thu, 19 Jan 2023 20:43:15 +0530
commit

490080c7e4b6e71de6e675d98d3bd44d8ea31907

parent

e494bc9c5aaf7f95cd114dc323d53ea2ab0287c3

2 files changed, 22 insertions(+), 19 deletions(-)

jump to
M config/nvim/init.luaconfig/nvim/init.lua

@@ -84,31 +84,32 @@ }

require('telescope').load_extension('fzf') -require'nvim-treesitter.configs'.setup { - ensure_installed = { "python", "hcl", "json", "go", "lua", "javascript", "typescript", "html", "css", "c", "cpp", "rust" }, - sync_install = false, - auto_install = true, - -- ignore_install = { "javascript" }, - highlight = { - enable = true, - disable = { "help"}, +-- require'nvim-treesitter.configs'.setup { +-- ensure_installed = { "python", "hcl", "json", "go", "lua", "javascript", "typescript", "html", "css", "c", "cpp", "rust" }, +-- sync_install = false, +-- auto_install = true, +-- -- ignore_install = { "javascript" }, +-- highlight = { +-- enable = true, +-- disable = { "help"}, - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = true, - }, - indent = { - enable = false, - disable = {"hcl", "python"} - } -} +-- -- Setting this to true will run `:h syntax` and tree-sitter at the same time. +-- -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). +-- -- Using this option may slow down your editor, and you may see some duplicate highlights. +-- -- Instead of true it can also be a list of languages +-- additional_vim_regex_highlighting = true, +-- }, +-- indent = { +-- enable = false, +-- disable = {"hcl", "python"} +-- } +-- } -- TODO move to seperate autocmd file vim.cmd ([[ autocmd FileType html,javascript,lua,typescript,yaml setlocal ts=2 sts=2 sw=2 + autocmd FileType hcl setlocal ts=2 sts=2 sw=2 autocmd BufRead *jsx setlocal sw=2 autocmd BufRead *tsx setlocal sw=2 ]])
M config/nvim/lua/keymaps.luaconfig/nvim/lua/keymaps.lua

@@ -47,6 +47,8 @@

k('n', '<leader>m', ':nohlsearch<CR>', options) k('n', '<leader>z', '<C-W>_', options) k('n', 'n', 'nzz', options) +k('n', '<C-d>', '<C-d>zz', options) +k('n', '<C-u>', '<C-u>zz', options) -- fugitive k('n', '<leader>g', ':G<CR>', options)