feat:new nvim config and some other stuff
This commit is contained in:
35
.config/nvim/lua/config/lazy.lua
Normal file
35
.config/nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
--vim.g.mapleader = "/\"
|
||||
--im.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
-- install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
@@ -1,12 +0,0 @@
|
||||
return {
|
||||
'github/copilot.vim',
|
||||
config = function()
|
||||
vim.keymap.set('i', '<C-J>', 'copilot#Accept("\\<CR>")', {
|
||||
expr = true,
|
||||
replace_keycodes = false
|
||||
})
|
||||
vim.keymap.set('i', '<C-L>', '<Plug>(copilot-accept-word)')
|
||||
vim.g.copilot_enabled = 'v:false'
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
return {
|
||||
'ThePrimeagen/harpoon',
|
||||
config = function(_, opts)
|
||||
require('harpoon').setup(opts)
|
||||
local mark = require('harpoon'.. ".mark")
|
||||
local ui = require('harpoon'.. ".ui")
|
||||
|
||||
-- Harpoon marked files 1 through 4.
|
||||
vim.keymap.set("n", "<a-1>", function() ui.nav_file(1) end)
|
||||
vim.keymap.set("n", "<a-2>", function() ui.nav_file(2) end)
|
||||
vim.keymap.set("n", "<a-3>", function() ui.nav_file(3) end)
|
||||
vim.keymap.set("n", "<a-4>", function() ui.nav_file(4) end)
|
||||
|
||||
-- Harpoon next and previous.
|
||||
vim.keymap.set("n", "<a-n>", function() ui.nav_next() end)
|
||||
vim.keymap.set("n", "<a-p>", function() ui.nav_prev() end)
|
||||
|
||||
-- Harpoon user interface.
|
||||
vim.keymap.set("n", "<leader>hq", ui.toggle_quick_menu)
|
||||
vim.keymap.set("n", "<leader>ha", mark.add_file)
|
||||
|
||||
end
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
return {
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
dependencies = {
|
||||
"mason-org/mason.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
"ms-jpq/coq_nvim", -- Optional (auto complete)
|
||||
},
|
||||
config = function()
|
||||
--vim.lsp.config('lua_ls',coq.lsp_ensure_capabilities())
|
||||
--vim.lsp.config('clangd',coq.lsp_ensure_capabilities())
|
||||
end
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
return{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons', opt = true },
|
||||
config = function()
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
}
|
||||
end
|
||||
}
|
||||
6
.config/nvim/lua/plugins/nvim-lspconfig.lua
Normal file
6
.config/nvim/lua/plugins/nvim-lspconfig.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
-- plugins/telescope.lua:
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
config = function()
|
||||
end
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
-- plugins/telescope.lua:
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.2',
|
||||
'nvim-telescope/telescope.nvim', tag = 'v0.1.9',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
||||
|
||||
require('telescope').setup{
|
||||
pickers = {
|
||||
|
||||
Reference in New Issue
Block a user