diff --git a/lua/config/options.lua b/lua/config/options.lua index 413085e2..665d86f8 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -1,5 +1,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' +vim.g.have_nerd_font = true +vim.opt.guifont='FiraCode Nerd Font' -- Make line numbers default vim.opt.number = true diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua new file mode 100644 index 00000000..eeb82108 --- /dev/null +++ b/lua/plugins/gitsigns.lua @@ -0,0 +1,12 @@ +return { -- Adds git related signs to the gutter, as well as utilities for managing changes + 'lewis6991/gitsigns.nvim', + opts = { + signs = { + add = { text = '+' }, + change = { text = '~' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + }, + }, +} diff --git a/lua/plugins/plugins.lua b/lua/plugins/plugins.lua index 2696eee7..2beec7f2 100644 --- a/lua/plugins/plugins.lua +++ b/lua/plugins/plugins.lua @@ -88,42 +88,28 @@ return { }, }, - { - 'nvim-telescope/telescope.nvim', tag = '0.1.8', - dependencies = { 'nvim-lua/plenary.nvim' }, - config = function() - require('telescope').setup({}) - local builtin = require 'telescope.builtin' - keymap('n', 'fh', builtin.help_tags, { desc = '[F]ind [H]elp' }) - keymap('n', 'fk', builtin.keymaps, { desc = '[F]ind [K]eymaps' }) - keymap('n', 'ff', builtin.find_files, { desc = '[F]ind [F]iles' }) - keymap('n', 'fa', builtin.find_files, { desc = '[F]ind [A]ll Files' }) - keymap('n', 'fs', builtin.builtin, { desc = '[F]ind Telescope' }) - keymap('n', 'fw', builtin.grep_string, { desc = '[F]ind current [W]ord' }) - keymap('n', 'fg', builtin.live_grep, { desc = '[F]ind by [G]rep' }) - keymap('n', 'fd', builtin.diagnostics, { desc = '[F]ind [D]iagnostics' }) - keymap('n', 'fr', builtin.resume, { desc = '[F]ind [R]esume' }) - keymap('n', 'f.', builtin.oldfiles, { desc = '[F]ind Recent Files ("." for repeat)' }) - keymap('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) - end, - }, - { - "kylechui/nvim-surround", - version = "^3.0.0", -- Use for stability; omit to use `main` branch for the latest features - event = "VeryLazy", + { + "echasnovski/mini.nvim", config = function() - require("nvim-surround").setup({}) - end + -- Better Around/Inside textobjects + require("mini.ai").setup { n_lines = 500 } + + -- Add/delete/replace surroundings (brackets, quotes, etc.) + -- + -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren + -- - sd' - [S]urround [D]elete [']quotes + -- - sr)' - [S]urround [R]eplace [)] ['] + require("mini.surround").setup() + end, }, { "stevearc/oil.nvim", lazy = false, + dependencies = { "nvim-tree/nvim-web-devicons" }, config = function () - require("oil").setup() - keymap("n", "-", "Oil", { desc = "Open parent directory" }) + require("oil").setup({}) end - } - + }, } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 00000000..890bdd7b --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,38 @@ +return { + 'nvim-telescope/telescope.nvim', tag = '0.1.8', + dependencies = { + { 'nvim-lua/plenary.nvim' }, + { + 'nvim-telescope/telescope-fzf-native.nvim', + -- `build` is used to run some command when the plugin is installed/updated. + build = 'make', + -- `cond` is a condition used to determine whether this plugin should be + -- installed and loaded. + cond = function() + return vim.fn.executable 'make' == 1 + end, + }, + { 'nvim-telescope/telescope-ui-select.nvim' }, + }, + config = function() + require('telescope').setup({}) + local keymap = vim.keymap.set + local builtin = require 'telescope.builtin' + keymap('n', 'fh', builtin.help_tags, { desc = '[F]ind [H]elp' }) + keymap('n', 'fk', builtin.keymaps, { desc = '[F]ind [K]eymaps' }) + keymap('n', 'ff', builtin.find_files, { desc = '[F]ind [F]iles' }) + keymap('n', 'fa', builtin.find_files, { desc = '[F]ind [A]ll Files' }) + keymap('n', 'fs', builtin.builtin, { desc = '[F]ind Telescope' }) + keymap('n', 'fw', builtin.grep_string, { desc = '[F]ind current [W]ord' }) + keymap('n', 'fg', builtin.live_grep, { desc = '[F]ind by [G]rep' }) + keymap('n', 'fd', builtin.diagnostics, { desc = '[F]ind [D]iagnostics' }) + keymap('n', 'fr', builtin.resume, { desc = '[F]ind [R]esume' }) + keymap('n', 'f.', builtin.oldfiles, { desc = '[F]ind Recent Files ("." for repeat)' }) + keymap('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) + + keymap('n', 'fn', function() + builtin.find_files { cwd = vim.fn.stdpath 'config' } + end, { desc = '[S]earch [N]eovim files' }) + + end, +} diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua new file mode 100644 index 00000000..00276f50 --- /dev/null +++ b/lua/plugins/which-key.lua @@ -0,0 +1,13 @@ +return { -- Useful plugin to show you pending keybinds. + 'folke/which-key.nvim', + event = 'VimEnter', -- Sets the loading event to 'VimEnter'. Loads the plugin when nvim finishes starting up. + opts = { + -- delay between pressing a key and opening which-key (milliseconds) + -- this setting is independent of vim.o.timeoutlen + delay = 0, + icons = { + mappings = vim.g.have_nerd_font, + keys = vim.g.have_nerd_font and {} + } + }, +} diff --git a/newfile.txt b/newfile.txt new file mode 100644 index 00000000..e69de29b diff --git a/sample.py b/sample.py index fd54bdf8..c96fdc65 100644 --- a/sample.py +++ b/sample.py @@ -1,8 +1,3 @@ - -print("hello, world, ") - -print("hello, world, ") -print("hello sir") json = { 'a' : 1, "b" : 2, @@ -16,7 +11,7 @@ def sample_func(): print("hello, worldworld") print("hello, world, ") - +print() print("hello, world, ") print("hello, world, ") json = { @@ -29,6 +24,7 @@ print("file name sample.py") if True: print("hello, world") + #################################################### ####################################################