Initial nvim configuration
This commit is contained in:
commit
84a2b92317
34
coc-settings.json
Normal file
34
coc-settings.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"languageserver": {
|
||||
"nix": {
|
||||
"command": "nixd",
|
||||
"filetypes": ["nix"]
|
||||
},
|
||||
"lua": {
|
||||
"command": "lua-language-server",
|
||||
"filetypes": ["lua"],
|
||||
"settings": {
|
||||
"Lua": {
|
||||
"workspace": {
|
||||
"library": {
|
||||
"$VIMRUNTIME/lua": true,
|
||||
"$VIMRUNTIME/lua/vim/lsp": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"rust": {
|
||||
"command": "rust-analyzer",
|
||||
"filetypes": ["rust"]
|
||||
},
|
||||
"go": {
|
||||
"command": "gopls",
|
||||
"filetypes": ["go"]
|
||||
},
|
||||
"python": {
|
||||
"command": "pyright",
|
||||
"filetypes": ["python"]
|
||||
}
|
||||
}
|
||||
}
|
||||
26
init.lua
Normal file
26
init.lua
Normal file
@ -0,0 +1,26 @@
|
||||
-- just configure plugins
|
||||
require("config.lazy")
|
||||
|
||||
vim.opt.mouse = 'a'
|
||||
vim.opt.encoding = "utf-8"
|
||||
vim.opt.number = true
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.scrolloff = 7
|
||||
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.modifiable = true
|
||||
vim.opt.fileformat = "unix"
|
||||
|
||||
|
||||
vim.g.coc_snippet_next = '<tab>'
|
||||
|
||||
vim.g.mkdp_port = 20300
|
||||
vim.g.mkdp_open_to_the_world = 1
|
||||
vim.g.mkdp_browser = "firefox"
|
||||
|
||||
|
||||
vim.keymap.set('n', ",<space>", "<cmd>nohlsearch<cr>", { silent = true })
|
||||
37
lazy-lock.json
Normal file
37
lazy-lock.json
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||
"ayu-vim": { "branch": "master", "commit": "01faacb4cb76e8cf72ad9858c581d80876260ab3" },
|
||||
"calendar-vim": { "branch": "master", "commit": "2083a41e2d310f9bbbbf644517f30e901f1fb04d" },
|
||||
"coc.nvim": { "branch": "release", "commit": "b7d75378ff80f0618b3b567993d5545f071d0219" },
|
||||
"comfortable-motion.vim": { "branch": "master", "commit": "e20aeafb07c6184727b29f7674530150f7ab2036" },
|
||||
"emmet-vim": { "branch": "master", "commit": "6c511a8d7d2863066f32e25543e2bb99d505172c" },
|
||||
"gruvbox": { "branch": "master", "commit": "f1ecde848f0cdba877acb0c740320568252cc482" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"material.vim": { "branch": "main", "commit": "cecac931e8bd9e3d2cbb7c1e24ddb98887176f68" },
|
||||
"neotest": { "branch": "master", "commit": "dddbe8fe358b05b2b7e54fe4faab50563171a76d" },
|
||||
"nerdtree": { "branch": "master", "commit": "9b465acb2745beb988eff3c1e4aa75f349738230" },
|
||||
"nvim-luadev": { "branch": "master", "commit": "3ba0c02c378503739f1fdb95cff3ea2aad48db3e" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "8bc635a25f581d42b0a0e5ba8870bd73244dcdea" },
|
||||
"oceanic-next": { "branch": "master", "commit": "09833f72d5ba23de2e8bcae18f479f326f5f677a" },
|
||||
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"pycodestyle.nvim": { "branch": "master", "commit": "203ff9ffdc832dd125efa94dacf7ce898bbce100" },
|
||||
"tagbar": { "branch": "master", "commit": "8de7694c0aeda253073098bbc9fb890b2902ddb8" },
|
||||
"unite.vim": { "branch": "master", "commit": "0ccb3f7988d61a9a86525374be97360bd20db6bc" },
|
||||
"vim-css-color": { "branch": "master", "commit": "14fd934cdd9ca1ac0e53511094e612eb9bace373" },
|
||||
"vim-devicons": { "branch": "master", "commit": "71f239af28b7214eebb60d4ea5bd040291fb7e33" },
|
||||
"vim-flake8": { "branch": "master", "commit": "a245098a174f30feff1b4387526876975042084a" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" },
|
||||
"vim-gitgutter": { "branch": "main", "commit": "7b0b5098e3e57be86bb96cfbf2b8902381eef57c" },
|
||||
"vim-js": { "branch": "master", "commit": "35d9e2ef4d31618237463e3bdf4811b2f8a0dec5" },
|
||||
"vim-jsx-pretty": { "branch": "master", "commit": "6989f1663cc03d7da72b5ef1c03f87e6ddb70b41" },
|
||||
"vim-latex-live-preview": { "branch": "master", "commit": "e1906cd4930a58ebaa5eb446436df23522eafb51" },
|
||||
"vim-plugin-AnsiEsc": { "branch": "master", "commit": "690f820d20b6e3a79ba20499874eb7333aa4ca5c" },
|
||||
"vim-vue": { "branch": "master", "commit": "6ae8fa751fbe4c6605961d2309f8326873fa40a6" },
|
||||
"vim-which-key": { "branch": "master", "commit": "4843811d6f2104fe2140d4cddbb49352976647df" },
|
||||
"vimtex": { "branch": "master", "commit": "096a0450261abccb7944630fae66788712be46a8" },
|
||||
"wal.vim": { "branch": "master", "commit": "c72ba0d18946f29aab9c95eb6975d321c68b3681" },
|
||||
"yats.vim": { "branch": "master", "commit": "b325c449a2db4d9ee38aa441afa850a815982e8b" }
|
||||
}
|
||||
35
lua/config/lazy.lua
Normal file
35
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 = " "
|
||||
vim.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 = false }, -- I will update only when I will want to
|
||||
})
|
||||
110
lua/plugins/init.lua
Normal file
110
lua/plugins/init.lua
Normal file
@ -0,0 +1,110 @@
|
||||
return {
|
||||
-- "neovim/nvim-lspconfig",
|
||||
-- "hrsh7th/nvim-cmp",
|
||||
-- "hrsh7th/cmp-nvim-lsp",
|
||||
-- "saadparwaiz1/cmp_luasnip",
|
||||
"L3MON4D3/LuaSnip",
|
||||
|
||||
-- "neoclide/coc.nvim",
|
||||
{
|
||||
"neoclide/coc.nvim",
|
||||
branch = "release",
|
||||
config = function()
|
||||
vim.keymap.set('n', "J", "<cmd>call CocAction('doHover')<cr>", { silent = true })
|
||||
end
|
||||
},
|
||||
|
||||
-- "mfussenegger/nvim-jdtls",
|
||||
-- "vim-airline/vim-airline",
|
||||
"preservim/nerdtree",
|
||||
-- "tpope/vim-commentary",
|
||||
"preservim/tagbar",
|
||||
"yuttie/comfortable-motion.vim",
|
||||
"ryanoasis/vim-devicons",
|
||||
"ap/vim-css-color",
|
||||
-- {
|
||||
-- -- Install markdown preview, use npx if available.
|
||||
-- "iamcco/markdown-preview.nvim",
|
||||
-- cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
-- ft = { "markdown" },
|
||||
-- build = function(plugin)
|
||||
-- if vim.fn.executable "npx" then
|
||||
-- vim.cmd("!cd " .. plugin.dir .. " && cd app && npx --yes yarn install")
|
||||
-- else
|
||||
-- vim.cmd [[Lazy load markdown-preview.nvim]]
|
||||
-- vim.fn["mkdp#util#install"]()
|
||||
-- end
|
||||
-- end,
|
||||
-- init = function()
|
||||
-- if vim.fn.executable "npx" then vim.g.mkdp_filetypes = { "markdown" } end
|
||||
-- end,
|
||||
-- },
|
||||
-- {
|
||||
-- 'iamcco/markdown-preview.nvim',
|
||||
-- cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' },
|
||||
-- ft = { 'markdown' },
|
||||
-- build = function()
|
||||
-- vim.fn['mkdp#util#install']()
|
||||
-- end,
|
||||
-- },
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' },
|
||||
ft = { 'markdown' },
|
||||
build = function()
|
||||
vim.cmd [[Lazy load markdown-preview.nvim]]
|
||||
vim.fn['mkdp#util#install']()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"toppair/peek.nvim",
|
||||
event = { "VeryLazy" },
|
||||
build = "deno task build:fast",
|
||||
config = function()
|
||||
require("peek").setup({app="firefox"})
|
||||
vim.api.nvim_create_user_command("PeekOpen", require("peek").open, {})
|
||||
vim.api.nvim_create_user_command("PeekClose", require("peek").close, {})
|
||||
end,
|
||||
opts = {
|
||||
app = 'firefox',
|
||||
filetype = { 'markdown' },
|
||||
},
|
||||
},
|
||||
"bfredl/nvim-luadev",
|
||||
|
||||
-- "vimwiki/vimwiki",
|
||||
"mattn/calendar-vim",
|
||||
"Shougo/unite.vim",
|
||||
"powerman/vim-plugin-AnsiEsc",
|
||||
"preservim/tagbar",
|
||||
"liuchengxu/vim-which-key",
|
||||
-- "jiangmiao/auto-pairs",
|
||||
"HerringtonDarkholme/yats.vim",
|
||||
"posva/vim-vue",
|
||||
"tpope/vim-fugitive",
|
||||
"dylanaraps/wal.vim",
|
||||
"xuhdev/vim-latex-live-preview",
|
||||
"lervag/vimtex",
|
||||
"airblade/vim-gitgutter",
|
||||
"mattn/emmet-vim",
|
||||
"nvie/vim-flake8",
|
||||
"https://gitlab.com/HiPhish/pycodestyle.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
"nvim-neotest/neotest",
|
||||
-- "nvim-lua/completion-nvim",
|
||||
-- "neoclide/coc-snippets",
|
||||
"morhetz/gruvbox",
|
||||
"mhartington/oceanic-next",
|
||||
"kaicataldo/material.vim",
|
||||
{
|
||||
"ayu-theme/ayu-vim",
|
||||
config = function()
|
||||
vim.cmd([[let ayucolor="dark"]])
|
||||
vim.cmd([[colorscheme ayu]])
|
||||
end
|
||||
},
|
||||
"yuezk/vim-js",
|
||||
"maxmellon/vim-jsx-pretty",
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user