switched to a submodule
This commit is contained in:
commit
fdf977246d
14 changed files with 276 additions and 0 deletions
13
lua/plugins/barbar.lua
Normal file
13
lua/plugins/barbar.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
return { 'romgrk/barbar.nvim',
|
||||
dependencies = {
|
||||
'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status
|
||||
'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons
|
||||
},
|
||||
init = function() vim.g.barbar_auto_setup = false end,
|
||||
opts = {
|
||||
-- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default:
|
||||
-- animation = true,
|
||||
-- insert_at_start = true,
|
||||
-- …etc.
|
||||
},
|
||||
}
|
13
lua/plugins/catppuccin.lua
Normal file
13
lua/plugins/catppuccin.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
return { {
|
||||
"catppuccin/nvim",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("catppuccin").setup({
|
||||
flavour = "mocha",
|
||||
integrations = {
|
||||
treesitter = false,
|
||||
},
|
||||
})
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
end
|
||||
} }
|
11
lua/plugins/feline.lua
Normal file
11
lua/plugins/feline.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
'freddiehaddad/feline.nvim',
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
require('feline').setup()
|
||||
-- require('feline').winbar.setup() -- to use winbar
|
||||
require('feline').statuscolumn.setup() -- to use statuscolumn
|
||||
|
||||
-- require('feline').use_theme() -- to use a custom theme
|
||||
end
|
||||
}
|
11
lua/plugins/gitsigns.lua
Normal file
11
lua/plugins/gitsigns.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require("gitsigns").setup({
|
||||
current_line_blame = true,
|
||||
yadm = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
58
lua/plugins/lsp.lua
Normal file
58
lua/plugins/lsp.lua
Normal file
|
@ -0,0 +1,58 @@
|
|||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||
callback = function(ev)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||
|
||||
-- Buffer local mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local opts = { buffer = ev.buf }
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
|
||||
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
|
||||
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
|
||||
vim.keymap.set('n', '<space>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, opts)
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
|
||||
vim.keymap.set('n', '<space>f', function()
|
||||
vim.lsp.buf.format { async = true }
|
||||
end, opts)
|
||||
end,
|
||||
})
|
||||
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
lspconfig.pyright.setup({})
|
||||
|
||||
lspconfig.rust_analyzer.setup({})
|
||||
|
||||
lspconfig.lua_ls.setup({
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||
version = "LuaJIT",
|
||||
},
|
||||
workspace = {
|
||||
-- Make the server aware of Neovim runtime files
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
},
|
||||
-- Do not send telemetry data containing a randomized but unique identifier
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
32
lua/plugins/neo-tree.lua
Normal file
32
lua/plugins/neo-tree.lua
Normal file
|
@ -0,0 +1,32 @@
|
|||
-- TODO: set keymaps
|
||||
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||
},
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('neo-tree').setup({
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = true,
|
||||
},
|
||||
},
|
||||
window = {
|
||||
position = "right",
|
||||
width = 30,
|
||||
},
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ "<C-N>t", "<cmd>Neotree toggle<cr>", "Toggle Neotree" },
|
||||
{ "<C-N>f", "<cmd>Neotree filesystem focus<cr>", "Focus filesystem in Neotree" },
|
||||
{ "<C-N>b", "<cmd>Neotree buffers focus<cr>", "Focus buffers in Neotree" },
|
||||
{ "<C-N>g", "<cmd>Neotree git_status focus<cr>", "Focus git status in Neotree" },
|
||||
},
|
||||
}
|
16
lua/plugins/telescope.lua
Normal file
16
lua/plugins/telescope.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
branch = "0.1.x",
|
||||
dependencies = {
|
||||
"BurntSushi/ripgrep",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"sharkdp/fd",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
keys = {
|
||||
{ "<C-t>f", "<cmd>Telescope find_files<cr>", desc = "Fuzzy find files with Telescope" },
|
||||
{ "<C-p>", "<cmd>Telescope find_files<cr>", desc = "Fuzzy find files with Telescope" },
|
||||
{ "<C-t>b", "<cmd>Telescope buffers<cr>", desc = "Fuzzy find open buffers with Telescope" },
|
||||
}
|
||||
}
|
16
lua/plugins/treesitter.lua
Normal file
16
lua/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require('nvim-treesitter.configs').setup({
|
||||
modules = {},
|
||||
ensure_installed = { "lua", "rust" },
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
ignore_install = {},
|
||||
})
|
||||
end
|
||||
}
|
12
lua/plugins/undotree.lua
Normal file
12
lua/plugins/undotree.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
"mbbill/undotree",
|
||||
keys = {
|
||||
{
|
||||
"<A-u>",
|
||||
function()
|
||||
vim.cmd.UndotreeToggle();
|
||||
vim.cmd.UndotreeFocus();
|
||||
end
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue