init
This commit is contained in:
commit
9de13c05de
|
@ -0,0 +1 @@
|
||||||
|
plugin/packer_compiled.lua
|
|
@ -0,0 +1,8 @@
|
||||||
|
function Color(color)
|
||||||
|
color = color or "rose-pine"
|
||||||
|
vim.cmd.colorscheme(color)
|
||||||
|
-- vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||||
|
-- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||||
|
end
|
||||||
|
|
||||||
|
Color()
|
|
@ -0,0 +1,7 @@
|
||||||
|
local dap = require('dap')
|
||||||
|
|
||||||
|
dap.adapters.godot = {
|
||||||
|
type = "server",
|
||||||
|
host = "127.0.0.1",
|
||||||
|
port = 6006,
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
|
|
@ -0,0 +1,5 @@
|
||||||
|
local mark = require("harpoon.mark")
|
||||||
|
local ui = require("harpoon.ui")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>a", mark.add_file)
|
||||||
|
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
|
@ -0,0 +1,49 @@
|
||||||
|
local lsp = require("lsp-zero")
|
||||||
|
|
||||||
|
|
||||||
|
local cmp = require('cmp')
|
||||||
|
local cmp_select = {behavior = cmp.SelectBehavior.Select}
|
||||||
|
local cmp_mappings = lsp.defaults.cmp_mappings({
|
||||||
|
['<C-k>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||||
|
['<C-j>'] = cmp.mapping.select_next_item(cmp_select),
|
||||||
|
['<C-y>'] = cmp.mapping.confirm({select = true}),
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
})
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
sources = {
|
||||||
|
{name = 'path'},
|
||||||
|
{name = 'nvim_lsp'},
|
||||||
|
{name = 'nvim_lua'},
|
||||||
|
},
|
||||||
|
formatting = lsp.cmp_format(),
|
||||||
|
mapping = cmp.mapping.preset.insert(cmp_mappings)
|
||||||
|
})
|
||||||
|
|
||||||
|
lsp.on_attach(function(client, bufnr)
|
||||||
|
local opts = {buffer = bufnr, remap = false}
|
||||||
|
|
||||||
|
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||||
|
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
||||||
|
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_next() end, opts)
|
||||||
|
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_prev() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
||||||
|
vim.keymap.set("n", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||||
|
|
||||||
|
end)
|
||||||
|
|
||||||
|
require('mason').setup({})
|
||||||
|
require('mason-lspconfig').setup({
|
||||||
|
ensure_installed = {'tsserver', 'eslint', 'rust_analyzer', 'gopls'},
|
||||||
|
handlers = {
|
||||||
|
lsp.default_setup,
|
||||||
|
lua_ls = function()
|
||||||
|
local lua_opts = lsp.nvim_lua_ls()
|
||||||
|
require('lspconfig').lua_ls.setup(lua_opts)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
})
|
|
@ -0,0 +1,8 @@
|
||||||
|
local builtin = require('telescope.builtin')
|
||||||
|
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
|
||||||
|
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
|
||||||
|
vim.keymap.set('n', '<leader>pb', builtin.buffers, {})
|
||||||
|
vim.keymap.set('n', '<leader>ph', builtin.help_tags, {})
|
||||||
|
vim.keymap.set('n', '<leader>ps', function()
|
||||||
|
builtin.grep_string({search = vim.fn.input("Grep > ") })
|
||||||
|
end)
|
|
@ -0,0 +1,30 @@
|
||||||
|
require'nvim-treesitter.configs'.setup {
|
||||||
|
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||||
|
ensure_installed = { "javascript", "typescript", "c", "lua", "vim", "vimdoc", "query", "rust", "go" },
|
||||||
|
|
||||||
|
-- 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,
|
||||||
|
|
||||||
|
|
||||||
|
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
||||||
|
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
||||||
|
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
|
||||||
|
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
|
||||||
|
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
|
||||||
|
-- the name of the parser)
|
||||||
|
-- list of language that will be disabled
|
||||||
|
|
||||||
|
-- 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,
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
|
@ -0,0 +1,2 @@
|
||||||
|
require("nefrace.remap")
|
||||||
|
require("nefrace.set")
|
|
@ -0,0 +1,45 @@
|
||||||
|
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
|
||||||
|
|
||||||
|
-- Only required if you have packer configured as `opt`
|
||||||
|
vim.cmd [[packadd packer.nvim]]
|
||||||
|
|
||||||
|
return require('packer').startup(function(use)
|
||||||
|
-- Packer can manage itself
|
||||||
|
use 'wbthomason/packer.nvim'
|
||||||
|
use {
|
||||||
|
'nvim-telescope/telescope.nvim', tag = '0.1.4',
|
||||||
|
requires = { {'nvim-lua/plenary.nvim' } }
|
||||||
|
}
|
||||||
|
|
||||||
|
use({
|
||||||
|
'rose-pine/neovim',
|
||||||
|
as = 'rose-pine',
|
||||||
|
config = function()
|
||||||
|
vim.cmd('colorscheme rose-pine')
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
|
||||||
|
use('theprimeagen/harpoon')
|
||||||
|
use('mbbill/undotree')
|
||||||
|
use('tpope/vim-fugitive')
|
||||||
|
use('mfussenegger/nvim-dap')
|
||||||
|
|
||||||
|
|
||||||
|
use {
|
||||||
|
'VonHeikemen/lsp-zero.nvim',
|
||||||
|
branch = 'v3.x',
|
||||||
|
requires = {
|
||||||
|
--- Uncomment these if you want to manage LSP servers from neovim
|
||||||
|
{'williamboman/mason.nvim'},
|
||||||
|
{'williamboman/mason-lspconfig.nvim'},
|
||||||
|
|
||||||
|
-- LSP Support
|
||||||
|
{'neovim/nvim-lspconfig'},
|
||||||
|
-- Autocompletion
|
||||||
|
{'hrsh7th/nvim-cmp'},
|
||||||
|
{'hrsh7th/cmp-nvim-lsp'},
|
||||||
|
{'L3MON4D3/LuaSnip'},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end)
|
|
@ -0,0 +1,2 @@
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
|
@ -0,0 +1,34 @@
|
||||||
|
vim.opt.guicursor = ""
|
||||||
|
|
||||||
|
vim.opt.nu = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.softtabstop = 4
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
|
||||||
|
vim.opt.smartindent = true
|
||||||
|
|
||||||
|
vim.opt.wrap = false
|
||||||
|
|
||||||
|
vim.opt.backup = false
|
||||||
|
vim.opt.swapfile = false
|
||||||
|
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||||
|
vim.opt.undofile = true
|
||||||
|
|
||||||
|
vim.opt.hlsearch = false
|
||||||
|
vim.opt.incsearch = true
|
||||||
|
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
|
vim.opt.scrolloff = 8
|
||||||
|
vim.opt.signcolumn = "yes"
|
||||||
|
vim.opt.isfname:append("@-@")
|
||||||
|
|
||||||
|
vim.opt.updatetime = 50
|
||||||
|
|
||||||
|
vim.opt.colorcolumn = "80"
|
||||||
|
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
|
Loading…
Reference in New Issue