summaryrefslogtreecommitdiff
path: root/after
diff options
context:
space:
mode:
authortalha <talha@talhaamir.xyz>2024-04-23 00:43:02 +0500
committertalha <talha@talhaamir.xyz>2024-04-23 00:43:02 +0500
commitf4431f6d75baa71aa23318ea50bea3848f946ab1 (patch)
treeb68fdc45b210d7c8adf2db39a2e7d499ccc1ba6f /after
parent721ef14cf3906992d8615456493de439ada8e1b8 (diff)
Migrated to lazy.nvim, added neomake, a few remaps
Diffstat (limited to 'after')
-rw-r--r--after/plugin/harpoon.lua8
-rw-r--r--after/plugin/lsp.lua6
-rw-r--r--after/plugin/telescope.lua4
-rw-r--r--after/plugin/treesitter.lua21
4 files changed, 7 insertions, 32 deletions
diff --git a/after/plugin/harpoon.lua b/after/plugin/harpoon.lua
index 7d2a7a6..a24b20d 100644
--- a/after/plugin/harpoon.lua
+++ b/after/plugin/harpoon.lua
@@ -4,7 +4,7 @@ local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
-vim.keymap.set("n", "<C-f>y", function() ui.nav_file(1) end)
-vim.keymap.set("n", "<C-f>u", function() ui.nav_file(2) end)
-vim.keymap.set("n", "<C-f>i", function() ui.nav_file(3) end)
-vim.keymap.set("n", "<C-f>o", function() ui.nav_file(4) end)
+vim.keymap.set("n", "<C-f>1", function() ui.nav_file(1) end)
+vim.keymap.set("n", "<C-f>2", function() ui.nav_file(2) end)
+vim.keymap.set("n", "<C-f>3", function() ui.nav_file(3) end)
+vim.keymap.set("n", "<C-f>4", function() ui.nav_file(4) end)
diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua
index f8dae3c..7d8e3ab 100644
--- a/after/plugin/lsp.lua
+++ b/after/plugin/lsp.lua
@@ -1,10 +1,5 @@
local lsp = require('lsp-zero').preset({})
-local function allow_format(servers)
- return function(client) return vim.tbl_contains(servers, client.name) end
-end
-
-
-- TODO: add bindings to work when no lsp available, to allow normal functionality
lsp.on_attach(function(client, bufnr)
-- see :help lsp-zero-keybindings
@@ -23,3 +18,4 @@ lsp.on_attach(function(client, bufnr)
end)
lsp.setup()
+
diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua
index 4806008..b007673 100644
--- a/after/plugin/telescope.lua
+++ b/after/plugin/telescope.lua
@@ -1,6 +1,6 @@
local builtin = require('telescope.builtin')
-vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
+vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
-vim.keymap.set('n', '<leader>ps', function()
+vim.keymap.set('n', '<leader>fs', function()
builtin.grep_string({ search = vim.fn.input("Grep > ") });
end)
diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua
deleted file mode 100644
index d0ee3dc..0000000
--- a/after/plugin/treesitter.lua
+++ /dev/null
@@ -1,21 +0,0 @@
-require'nvim-treesitter.configs'.setup {
- -- A list of parser names, or "all" (the five listed parsers should always be installed)
- ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "javascript", "typescript", "python", "cpp"},
-
- -- Install parsers synchronously (only applied to `ensure_installed`)
- sync_install = false,
-
- -- Automatically install missing parsers when entering buffer
- -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
- auto_install = true,
-
- highlight = {
- enable = true,
-
- -- 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 = false,
- },
-}