+++ /dev/null
-{
- "diagnostic-languageserver.formatFiletypes": {
- "python": [
- "black",
- "isort",
- "docformatter"
- ]
- },
- "diagnostic-languageserver.formatters": {
- "black": {
- "command": "black",
- "args": [
- "-q",
- "-"
- ]
- },
- "isort": {
- "command": "isort",
- "args": [
- "-q",
- "-"
- ]
- },
- "docformatter": {
- "command": "docformatter",
- "args": [
- "-"
- ]
- }
- },
- "diagnostic-languageserver.filetypes": {
- "python": "flake8"
- },
- "diagnostic-languageserver.linters": {
- "flake8": {
- "sourceName": "flake8",
- "command": "flake8",
- "debounce": 200,
- "rootPatterns": [
- ".git",
- "pyproject.toml",
- "setup.py"
- ],
- "args": [
- "--ignore=E402,C901,W503,W504,E116,E702,C0103,C0114,C0115,C0116,C0103,C0301,W0613,W0102,R0903,R0902,R0914,R0915,R0205,W0703,W0702,W0603",
- "--format=%(row)d,%(col)d,%(code).1s,%(code)s: %(text)s",
- "--max-line-length=88",
- "-"
- ],
- "offsetLine": 0,
- "offsetColumn": 0,
- "formatLines": 1,
- "formatPattern": [
- "(\\d+),(\\d+),([A-Z]),(.*)(\\r|\\n)*$",
- {
- "line": 1,
- "column": 2,
- "security": 3,
- "message": 4
- }
- ],
- "securities": {
- "W": "info",
- "E": "warning",
- "F": "info",
- "C": "info",
- "N": "hint"
- }
- }
- },
- "coc.preferences.formatOnSaveFiletypes": [
- "c",
- "cpp",
- "css",
- "markdown",
- "javascript",
- "graphql",
- "html",
- "yaml",
- "json",
- "python",
- "rust",
- "toml"
- ],
- "html.filetypes": [
- "html",
- "handlebars",
- "htmldjango",
- "blade",
- "jinja"
- ]
-}
+++ /dev/null
-for f in split(glob('$HOME/.config/nvim/vim_settings/*/*.vim'), '\n')
- exe 'source' f
-endfor
-
-for f in split(glob('$HOME/.config/nvim/vim_settings/*.vim'), '\n')
- exe 'source' f
-endfor
-
-for f in split(glob('$HOME/.config/nvim/plug_settings/*/*.vim'), '\n')
- exe 'source' f
-endfor
-
-for f in split(glob('$HOME/.config/nvim/plug_settings/*.vim'), '\n')
- exe 'source' f
-endfor
--- /dev/null
+require("nvim.options")
+require("nvim.keymaps")
+require("nvim.plugins")
+require("nvim.colorscheme")
+require("nvim.cmp")
+require("nvim.lsp")
+require("nvim.autopairs")
--- /dev/null
+-- If you want insert `(` after select function or method item
+local status_ok, npairs = pcall(require, "nvim-autopairs")
+if not status_ok then
+ return
+end
+
+npairs.setup ({
+ check_ts = true,
+ ts_config = {
+ lua = {"string"}, -- it will not add a pair on that treesitter node
+ javascript = {"template_string"},
+ java = false, -- don't check treesitter on java
+ }
+})
+
+local cmp_autopairs = require('nvim-autopairs.completion.cmp')
+local cmp_status_ok, cmp = pcall(require, "cmp")
+if not cmp_status_ok then
+ return
+end
+cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } }))
+
+
+-- add a lisp filetype (wrap my-function), FYI: Hardcoded = { "clojure", "clojurescript", "fennel", "janet" }
+cmp_autopairs.lisp[#cmp_autopairs.lisp+1] = "racket"
--- /dev/null
+local cmp_status_ok, cmp = pcall(require, "cmp")
+if not cmp_status_ok then
+ print("Error loading cmp")
+ return
+end
+
+local snip_status_ok, luasnip = pcall(require, "luasnip")
+if not snip_status_ok then
+ print("Error loading snip")
+ return
+end
+
+require("luasnip/loaders/from_vscode").lazy_load()
+
+local check_backspace = function()
+ local col = vim.fn.col "." - 1
+ return col == 0 or vim.fn.getline("."):sub(col, col):match "%s"
+end
+
+-- פּ ﯟ some other good icons
+local kind_icons = {
+ Text = "",
+ Method = "m",
+ Function = "",
+ Constructor = "",
+ Field = "",
+ Variable = "",
+ Class = "",
+ Interface = "",
+ Module = "",
+ Property = "",
+ Unit = "",
+ Value = "",
+ Enum = "",
+ Keyword = "",
+ Snippet = "",
+ Color = "",
+ File = "",
+ Reference = "",
+ Folder = "",
+ EnumMember = "",
+ Constant = "",
+ Struct = "",
+ Event = "",
+ Operator = "",
+ TypeParameter = "",
+}
+
+cmp.setup {
+ snippet = {
+ expand = function(args)
+ luasnip.lsp_expand(args.body)
+ end,
+ },
+ mapping = {
+ ["<C-k>"] = cmp.mapping.select_prev_item(),
+ ["<C-j>"] = cmp.mapping.select_next_item(),
+ ["<C-p>"] = cmp.mapping.select_prev_item(),
+ ["<C-n>"] = cmp.mapping.select_next_item(),
+ ["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
+ ["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
+ ["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
+ ["<C-e>"] = cmp.mapping {
+ i = cmp.mapping.abort(),
+ c = cmp.mapping.close(),
+ },
+ ["<CR>"] = cmp.mapping.confirm { select = false },
+ ["<Tab>"] = cmp.mapping(function(fallback)
+ if cmp.visible() then
+ cmp.select_next_item()
+ elseif luasnip.expandable() then
+ luasnip.expand()
+ elseif luasnip.expand_or_jumpable() then
+ luasnip.expand_or_jump()
+ elseif check_backspace() then
+ fallback()
+ else
+ fallback()
+ end
+ end, {
+ "i",
+ "s",
+ }),
+ ["<S-Tab>"] = cmp.mapping(function(fallback)
+ if cmp.visible() then
+ cmp.select_prev_item()
+ elseif luasnip.jumpable(-1) then
+ luasnip.jump(-1)
+ else
+ fallback()
+ end
+ end, {
+ "i",
+ "s",
+ }),
+ },
+ formatting = {
+ fields = { "kind", "abbr", "menu" },
+ },
+ sources = {
+ { name = "nvim_lsp" },
+ { name = "nvim_lua" },
+ { name = "luasnip" },
+ { name = "buffer" },
+ { name = "path" },
+ },
+ confirm_opts = {
+ behavior = cmp.ConfirmBehavior.Replace,
+ select = false,
+ },
+ window = {
+ completion = cmp.config.window.bordered(),
+ documentation = cmp.config.window.bordered(),
+ },
+ experimental = {
+ ghost_text = true,
+ },
+}
+
+-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
+cmp.setup.cmdline('/', {
+ mapping = cmp.mapping.preset.cmdline(),
+ sources = {
+ { name = 'buffer' }
+ }
+})
+
+-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
+cmp.setup.cmdline(':', {
+ mapping = cmp.mapping.preset.cmdline(),
+ sources = cmp.config.sources({
+ { name = 'path' }
+ }, {
+ { name = 'cmdline' }
+ })
+})
--- /dev/null
+local status_ok, onedark = pcall(require, "onedark")
+if not status_ok then
+ vim.notify("Error with colorscheme")
+ return
+end
+
+onedark.setup {
+ style = "deep"
+}
+onedark.load()
--- /dev/null
+local opts = { noremap = true, silent = true }
+
+local function nnoremap(shortcut, command)
+ vim.keymap.set("n", shortcut, command, opts)
+end
+local function inoremap(shortcut, command)
+ vim.keymap.set("i", shortcut, command, opts)
+end
+local function vnoremap(shortcut, command)
+ vim.keymap.set("v", shortcut, command, opts)
+end
+local function xnoremap(shortcut, command)
+ vim.keymap.set("x", shortcut, command, opts)
+end
+local function tnoremap(shortcut, command)
+ vim.keymap.set("t", shortcut, command, opts)
+end
+
+-- Define leader key
+-- vim.api.nvim_set_keymap("", "<Space>", "<Nop>", opts)
+vim.g.mapleader = "\\"
+vim.g.maplocalleader = "\\"
+
+-- Sane Y behaviour
+nnoremap("Y", "y$")
+
+-- Better window navigation
+nnoremap("<C-h>", "<C-w>h")
+nnoremap("<C-j>", "<C-w>j")
+nnoremap("<C-k>", "<C-w>k")
+nnoremap("<C-l>", "<C-w>l")
+
+nnoremap("<leader>e", ":Lex 15<CR>")
+
+-- Resize
+nnoremap("<M-h>", ":vertical resize -2<CR>")
+nnoremap("<M-j>", ":resize +2<CR>")
+nnoremap("<M-k>", ":resize -2<CR>")
+nnoremap("<M-l>", ":vertical resize +2<CR>")
+
+-- Navigate Buffers
+nnoremap("<S-l>", ":bnext<CR>")
+nnoremap("<S-h>", ":bprevious<CR>")
+
+-- Quick ESC
+inoremap("jk", "<ESC>")
+
+-- Don't copy replaced text into register
+-- while in visual mode, when pasting
+vnoremap("p", "\"_dP")
+
+-- Move text up and down
+vnoremap("<M-j>", ":m .+1<CR>==")
+vnoremap("<M-k>", ":m .-2<CR>==")
+
+xnoremap("J", ":move '>+1<CR>gv-gv", opts)
+xnoremap("K", ":move '<-2<CR>gv-gv", opts)
+xnoremap("<A-j>", ":move '>+1<CR>gv-gv", opts)
+xnoremap("<A-k>", ":move '<-2<CR>gv-gv", opts)
+
+-- Terminal --
+-- Better terminal navigation
+tnoremap("<C-h>", "<C-\\><C-N><C-w>h")
+tnoremap("<C-j>", "<C-\\><C-N><C-w>j")
+tnoremap("<C-k>", "<C-\\><C-N><C-w>k")
+tnoremap("<C-l>", "<C-\\><C-N><C-w>l")
--- /dev/null
+local M = {}
+
+-- TODO: backfill this to template
+M.setup = function()
+ local signs = {
+ { name = "DiagnosticSignError", text = "" },
+ { name = "DiagnosticSignWarn", text = "" },
+ { name = "DiagnosticSignHint", text = "" },
+ { name = "DiagnosticSignInfo", text = "" },
+ }
+
+ for _, sign in ipairs(signs) do
+ vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
+ end
+
+ local config = {
+ -- disable virtual text
+ virtual_text = true,
+ -- show signs
+ signs = {
+ active = signs,
+ },
+ update_in_insert = true,
+ underline = true,
+ severity_sort = true,
+ float = {
+ focusable = false,
+ style = "minimal",
+ border = "rounded",
+ source = "always",
+ header = "",
+ prefix = "",
+ },
+ }
+
+ vim.diagnostic.config(config)
+
+ vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
+ border = "rounded",
+ })
+
+ vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
+ border = "rounded",
+ })
+end
+
+local function lsp_highlight_document(client)
+ -- Set autocommands conditional on server_capabilities
+ if client.resolved_capabilities.document_highlight then
+ vim.api.nvim_exec(
+ [[
+ augroup lsp_document_highlight
+ autocmd! * <buffer>
+ autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
+ autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
+ augroup END
+ ]],
+ false
+ )
+ end
+end
+
+local function lsp_keymaps(bufnr)
+ local opts = { noremap = true, silent = true }
+ vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts)
+ vim.api.nvim_buf_set_keymap(bufnr, "n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
+ vim.api.nvim_buf_set_keymap(bufnr, "n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
+ vim.api.nvim_buf_set_keymap(bufnr, "n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
+ vim.api.nvim_buf_set_keymap(bufnr, "n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
+ vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
+ vim.api.nvim_buf_set_keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
+ -- vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts)
+ -- vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>f", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
+ vim.api.nvim_buf_set_keymap(bufnr, "n", "[d", '<cmd>lua vim.diagnostic.goto_prev({ border = "rounded" })<CR>', opts)
+ vim.api.nvim_buf_set_keymap(
+ bufnr,
+ "n",
+ "gl",
+ '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics({ border = "rounded" })<CR>',
+ opts
+ )
+ vim.api.nvim_buf_set_keymap(bufnr, "n", "]d", '<cmd>lua vim.diagnostic.goto_next({ border = "rounded" })<CR>', opts)
+ vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>q", "<cmd>lua vim.diagnostic.setloclist()<CR>", opts)
+ vim.cmd [[ command! Format execute 'lua vim.lsp.buf.formatting()' ]]
+end
+
+M.on_attach = function(client, bufnr)
+ if client.name == "tsserver" then
+ client.resolved_capabilities.document_formatting = false
+ end
+ lsp_keymaps(bufnr)
+ lsp_highlight_document(client)
+end
+
+local capabilities = vim.lsp.protocol.make_client_capabilities()
+
+local status_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
+if not status_ok then
+ return
+end
+
+M.capabilities = cmp_nvim_lsp.update_capabilities(capabilities)
+
+return M
--- /dev/null
+local status_ok, _ = pcall(require, "lspconfig")
+if not status_ok then
+ print("Error with lspconfig")
+ return
+end
+
+require("nvim.lsp.lsp-installer")
+require("nvim.lsp.handlers").setup()
--- /dev/null
+local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer")
+if not status_ok then
+ print("Error with nvim-lsp-installer")
+ return
+end
+
+-- Register a handler that will be called for all installed servers.
+-- Alternatively, you may also register handlers on specific server instances instead (see example below).
+lsp_installer.on_server_ready(function(server)
+ local opts = {
+ on_attach = require("nvim.lsp.handlers").on_attach,
+ capabilities = require("nvim.lsp.handlers").capabilities,
+ }
+
+ if server.name == "jsonls" then
+ local jsonls_opts = require("nvim.lsp.settings.jsonls")
+ opts = vim.tbl_deep_extend("force", jsonls_opts, opts)
+ end
+
+ if server.name == "sumneko_lua" then
+ local sumneko_opts = require("nvim.lsp.settings.sumneko_lua")
+ opts = vim.tbl_deep_extend("force", sumneko_opts, opts)
+ end
+
+ if server.name == "pyright" then
+ local pyright_opts = require("nvim.lsp.settings.pyright")
+ opts = vim.tbl_deep_extend("force", pyright_opts, opts)
+ end
+
+ if server.name == "jedi_language_server" then
+ local jedi_opts = require("nvim.lsp.settings.jedi_language_server")
+ opts = vim.tbl_deep_extend("force", jedi_opts, opts)
+ end
+
+ -- This setup() function is exactly the same as lspconfig's setup function.
+ -- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
+ server:setup(opts)
+end)
--- /dev/null
+-- Find more schemas here: https://www.schemastore.org/json/
+local schemas = {
+ {
+ description = "TypeScript compiler configuration file",
+ fileMatch = {
+ "tsconfig.json",
+ "tsconfig.*.json",
+ },
+ url = "https://json.schemastore.org/tsconfig.json",
+ },
+ {
+ description = "Lerna config",
+ fileMatch = { "lerna.json" },
+ url = "https://json.schemastore.org/lerna.json",
+ },
+ {
+ description = "Babel configuration",
+ fileMatch = {
+ ".babelrc.json",
+ ".babelrc",
+ "babel.config.json",
+ },
+ url = "https://json.schemastore.org/babelrc.json",
+ },
+ {
+ description = "ESLint config",
+ fileMatch = {
+ ".eslintrc.json",
+ ".eslintrc",
+ },
+ url = "https://json.schemastore.org/eslintrc.json",
+ },
+ {
+ description = "Bucklescript config",
+ fileMatch = { "bsconfig.json" },
+ url = "https://raw.githubusercontent.com/rescript-lang/rescript-compiler/8.2.0/docs/docson/build-schema.json",
+ },
+ {
+ description = "Prettier config",
+ fileMatch = {
+ ".prettierrc",
+ ".prettierrc.json",
+ "prettier.config.json",
+ },
+ url = "https://json.schemastore.org/prettierrc",
+ },
+ {
+ description = "Vercel Now config",
+ fileMatch = { "now.json" },
+ url = "https://json.schemastore.org/now",
+ },
+ {
+ description = "Stylelint config",
+ fileMatch = {
+ ".stylelintrc",
+ ".stylelintrc.json",
+ "stylelint.config.json",
+ },
+ url = "https://json.schemastore.org/stylelintrc",
+ },
+ {
+ description = "A JSON schema for the ASP.NET LaunchSettings.json files",
+ fileMatch = { "launchsettings.json" },
+ url = "https://json.schemastore.org/launchsettings.json",
+ },
+ {
+ description = "Schema for CMake Presets",
+ fileMatch = {
+ "CMakePresets.json",
+ "CMakeUserPresets.json",
+ },
+ url = "https://raw.githubusercontent.com/Kitware/CMake/master/Help/manual/presets/schema.json",
+ },
+ {
+ description = "Configuration file as an alternative for configuring your repository in the settings page.",
+ fileMatch = {
+ ".codeclimate.json",
+ },
+ url = "https://json.schemastore.org/codeclimate.json",
+ },
+ {
+ description = "LLVM compilation database",
+ fileMatch = {
+ "compile_commands.json",
+ },
+ url = "https://json.schemastore.org/compile-commands.json",
+ },
+ {
+ description = "Config file for Command Task Runner",
+ fileMatch = {
+ "commands.json",
+ },
+ url = "https://json.schemastore.org/commands.json",
+ },
+ {
+ description = "AWS CloudFormation provides a common language for you to describe and provision all the infrastructure resources in your cloud environment.",
+ fileMatch = {
+ "*.cf.json",
+ "cloudformation.json",
+ },
+ url = "https://raw.githubusercontent.com/awslabs/goformation/v5.2.9/schema/cloudformation.schema.json",
+ },
+ {
+ description = "The AWS Serverless Application Model (AWS SAM, previously known as Project Flourish) extends AWS CloudFormation to provide a simplified way of defining the Amazon API Gateway APIs, AWS Lambda functions, and Amazon DynamoDB tables needed by your serverless application.",
+ fileMatch = {
+ "serverless.template",
+ "*.sam.json",
+ "sam.json",
+ },
+ url = "https://raw.githubusercontent.com/awslabs/goformation/v5.2.9/schema/sam.schema.json",
+ },
+ {
+ description = "Json schema for properties json file for a GitHub Workflow template",
+ fileMatch = {
+ ".github/workflow-templates/**.properties.json",
+ },
+ url = "https://json.schemastore.org/github-workflow-template-properties.json",
+ },
+ {
+ description = "golangci-lint configuration file",
+ fileMatch = {
+ ".golangci.toml",
+ ".golangci.json",
+ },
+ url = "https://json.schemastore.org/golangci-lint.json",
+ },
+ {
+ description = "JSON schema for the JSON Feed format",
+ fileMatch = {
+ "feed.json",
+ },
+ url = "https://json.schemastore.org/feed.json",
+ versions = {
+ ["1"] = "https://json.schemastore.org/feed-1.json",
+ ["1.1"] = "https://json.schemastore.org/feed.json",
+ },
+ },
+ {
+ description = "Packer template JSON configuration",
+ fileMatch = {
+ "packer.json",
+ },
+ url = "https://json.schemastore.org/packer.json",
+ },
+ {
+ description = "NPM configuration file",
+ fileMatch = {
+ "package.json",
+ },
+ url = "https://json.schemastore.org/package.json",
+ },
+ {
+ description = "JSON schema for Visual Studio component configuration files",
+ fileMatch = {
+ "*.vsconfig",
+ },
+ url = "https://json.schemastore.org/vsconfig.json",
+ },
+ {
+ description = "Resume json",
+ fileMatch = { "resume.json" },
+ url = "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
+ },
+}
+
+local opts = {
+ settings = {
+ json = {
+ schemas = schemas,
+ },
+ },
+ setup = {
+ commands = {
+ Format = {
+ function()
+ vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 })
+ end,
+ },
+ },
+ },
+}
+
+return opts
--- /dev/null
+return {
+ settings = {
+ python = {
+ analysis = {
+ typeCheckingMode = "strict",
+ }
+ }
+ },
+}
--- /dev/null
+return {
+ settings = {
+ Lua = {
+ diagnostics = {
+ globals = { "vim" },
+ },
+ workspace = {
+ library = {
+ [vim.fn.expand("$VIMRUNTIME/lua")] = true,
+ [vim.fn.stdpath("config") .. "/lua"] = true,
+ },
+ },
+ },
+ },
+}
--- /dev/null
+local options = {
+ backup = false,
+ clipboard = "unnamedplus",
+ cmdheight = 1,
+ completeopt = { "menuone", "noselect" },
+ conceallevel = 0,
+ fileencoding = "utf-8",
+ hlsearch = false,
+ showtabline = 4,
+ pumheight = 10,
+ smartcase = true,
+ smartindent = true,
+ smartindent = true,
+ splitbelow = true,
+ splitright = true,
+ swapfile = false,
+ termguicolors = true,
+ timeoutlen = 1000,
+ undofile = true,
+ updatetime = 300,
+ writebackup = false,
+ expandtab = true,
+ shiftwidth = 4,
+ tabstop = 4,
+ number = true,
+ relativenumber = true,
+ cursorline = true,
+ numberwidth = 4,
+ signcolumn = "yes",
+ wrap = false,
+ scrolloff = 8,
+ sidescrolloff = 8,
+ guifont = "monospace:h17",
+}
+
+vim.opt.shortmess:append "c"
+
+for k, v in pairs(options) do
+ vim.opt[k] = v
+end
--- /dev/null
+local fn = vim.fn
+
+-- Automatically install packer
+local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"
+if fn.empty(fn.glob(install_path)) > 0 then
+ PACKER_BOOTSTRAP = fn.system {
+ "git",
+ "clone",
+ "--depth",
+ "1",
+ "https://github.com/wbthomason/packer.nvim",
+ install_path,
+ }
+ print "Installing packer close and reopen Neovim ... "
+ vim.cmd [[packadd packer.nvim]]
+end
+
+-- Autocommand that reloads neovim whenver you save the plugins.lua file
+vim.cmd [[
+ augroup packer_user_config
+ autocmd!
+ autocmd BufWritePost plugins.lua source <afile> | PackerSync
+ augroup end
+]]
+
+-- Use a protected call so we don't error out on the first use
+local status_ok, packer = pcall(require, "packer")
+if not status_ok then
+ vim.notify("Error with require packer")
+ return
+end
+
+packer.init {
+ display = {
+ open_fn = function()
+ return require("packer.util").float {}
+ end,
+ },
+}
+
+-- Install plugins here
+return packer.startup(function(use)
+ use "wbthomason/packer.nvim" -- Have packer manage itself
+
+
+
+ -- PLUGINS BEGIN --
+ -- An implementation of the Popup API from vim in Neovim
+ use "nvim-lua/popup.nvim"
+
+ -- Useful lua functions used by lots of plugins
+ use "nvim-lua/plenary.nvim"
+
+ -- Preview markdown files
+ use({
+ "iamcco/markdown-preview.nvim",
+ run = function() vim.fn["mkdp#util#install"]() end,
+ })
+
+ -- Colorschemes
+ use "navarasu/onedark.nvim"
+
+ -- cmp Plugins
+ use 'hrsh7th/nvim-cmp'
+ use 'hrsh7th/cmp-buffer'
+ use 'hrsh7th/cmp-path'
+ use 'hrsh7th/cmp-cmdline'
+ use 'saadparwaiz1/cmp_luasnip'
+ use 'hrsh7th/cmp-nvim-lsp'
+ use 'hrsh7th/cmp-nvim-lua'
+
+ -- snippets
+ use 'L3MON4D3/LuaSnip'
+ use "rafamadriz/friendly-snippets" -- a bunch of snippets to use
+
+ -- LSP
+ use "neovim/nvim-lspconfig" -- enable LSP
+ use "williamboman/nvim-lsp-installer" -- simple to use language server installer
+
+ -- Commenter
+ use {
+ 'numToStr/Comment.nvim',
+ config = function()
+ require('Comment').setup()
+ end
+ }
+
+ -- Autopairs
+ use "windwp/nvim-autopairs"
+ -- PLUGINS END --
+
+
+
+
+ -- Automatically set up your configuration after cloning packer.nvim
+ -- Put this at the end after all plugins
+ if PACKER_BOOTSTRAP then
+ require("packer").sync()
+ end
+end)
--- /dev/null
+{
+ "diagnostic-languageserver.formatFiletypes": {
+ "python": [
+ "black",
+ "isort",
+ "docformatter"
+ ]
+ },
+ "diagnostic-languageserver.formatters": {
+ "black": {
+ "command": "black",
+ "args": [
+ "-q",
+ "-"
+ ]
+ },
+ "isort": {
+ "command": "isort",
+ "args": [
+ "-q",
+ "-"
+ ]
+ },
+ "docformatter": {
+ "command": "docformatter",
+ "args": [
+ "-"
+ ]
+ }
+ },
+ "diagnostic-languageserver.filetypes": {
+ "python": "flake8-black"
+ },
+ "diagnostic-languageserver.linters": {
+ "flake8": {
+ "sourceName": "flake8",
+ "command": "flake8",
+ "debounce": 200,
+ "rootPatterns": [
+ ".git",
+ "pyproject.toml",
+ "setup.py"
+ ],
+ "args": [
+ "--ignore=E203,E402,C901,W503,W504,E116,E702,C0103,C0114,C0115,C0116,C0103,C0301,W0613,W0102,R0903,R0902,R0914,R0915,R0205,W0703,W0702,W0603",
+ "--format=%(row)d,%(col)d,%(code).1s,%(code)s: %(text)s",
+ "--max-line-length=88",
+ "-"
+ ],
+ "offsetLine": 0,
+ "offsetColumn": 0,
+ "formatLines": 1,
+ "formatPattern": [
+ "(\\d+),(\\d+),([A-Z]),(.*)(\\r|\\n)*$",
+ {
+ "line": 1,
+ "column": 2,
+ "security": 3,
+ "message": 4
+ }
+ ],
+ "securities": {
+ "W": "info",
+ "E": "warning",
+ "F": "info",
+ "C": "info",
+ "N": "hint"
+ }
+ }
+ },
+ "coc.preferences.formatOnSaveFiletypes": [
+ "c",
+ "cpp",
+ "css",
+ "markdown",
+ "javascript",
+ "graphql",
+ "html",
+ "yaml",
+ "json",
+ "python",
+ "rust",
+ "toml"
+ ],
+ "html.filetypes": [
+ "html",
+ "handlebars",
+ "htmldjango",
+ "blade",
+ "jinja"
+ ]
+}
--- /dev/null
+for f in split(glob('$HOME/.config/nvim/vim_settings/*/*.vim'), '\n')
+ exe 'source' f
+endfor
+
+for f in split(glob('$HOME/.config/nvim/vim_settings/*.vim'), '\n')
+ exe 'source' f
+endfor
+
+for f in split(glob('$HOME/.config/nvim/plug_settings/*/*.vim'), '\n')
+ exe 'source' f
+endfor
+
+for f in split(glob('$HOME/.config/nvim/plug_settings/*.vim'), '\n')
+ exe 'source' f
+endfor
+
--- /dev/null
+au FileType jinja.html let b:AutoPairs = AutoPairsDefine({'{%' : '%}'})
--- /dev/null
+" Coc Mappings
+
+" Use `[g` and `]g` to navigate diagnostics
+" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
+nmap <silent> [g <Plug>(coc-diagnostic-prev)
+nmap <silent> ]g <Plug>(coc-diagnostic-next)
+
+" GoTo code navigation.
+nmap <silent> gd <Plug>(coc-definition)
+nmap <silent> gy <Plug>(coc-type-definition)
+nmap <silent> gi <Plug>(coc-implementation)
+nmap <silent> gr <Plug>(coc-references)
+
+" Formatting selected code
+xmap <leader>f <Plug>(coc-format-selected)
+nmap <leader>f <Plug>(coc-format-selected)
+
+augroup mygroup
+ autocmd!
+ " Setup formatexpr specified filetype(s).
+ autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
+ " Update signature help on jump placeholder.
+ autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
+augroup end
+
+" Symbol renaming
+nnoremap <leader>rn <Plug>(coc-rename)
+
+" Use tab for trigger completion with characters ahead and navigate.
+" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
+" other plugin before putting this into your config.
+inoremap <silent><expr> <TAB>
+ \ pumvisible() ? "\<C-n>" :
+ \ CheckBackspace() ? "\<TAB>" :
+ \ coc#refresh()
+inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
+
+function! CheckBackspace() abort
+ let col = col('.') - 1
+ return !col || getline('.')[col - 1] =~# '\s'
+endfunction
+
+" Use <CR> to trigger completion
+inoremap <silent><expr> <CR> pumvisible() ? "<Right>" : "\r"
+
--- /dev/null
+" Highlight the symbol and its references when holding the cursor
+autocmd CursorHold * silent call CocActionAsync('highlight')
+
--- /dev/null
+" Floaterm
+let g:floaterm_keymap_toggle = '<F1>'
+let g:floaterm_keymap_prev = '<F9>'
+let g:floaterm_keymap_next = '<F10>'
+let g:floaterm_keymap_new = '<F11>'
+let g:floaterm_keymap_kill = '<F12>'
--- /dev/null
+nnoremap <leader>n :NERDTree<CR>
+nnoremap <leader>e :NERDTreeToggle<CR>
+nnoremap <leader>f :NERDTreeFocus<CR>
--- /dev/null
+let g:NERDTreeGitStatusUseNerdFonts = 1
+let g:NERDTreeHighlightCursorline = 0
+let g:NERDTreeShowHidden = 0
+
+let g:NERDTreeIgnore = [
+ \ '__pycache__',
+ \ '.\.so',
+ \ 'build',
+ \ 'develop-eggs',
+ \ 'dist',
+ \ 'downloads',
+ \ 'eggs',
+ \ '.\.egg-info',
+ \ '__pypackages__',
+ \ '\.env',
+ \ '\.venv',
+ \ 'env',
+ \ 'venv',
+ \ 'ENV',
+ \ 'env\.bak',
+ \ 'venv\.bak'
+\]
--- /dev/null
+augroup qs_colors
+ autocmd!
+ autocmd ColorScheme * highlight QuickScopePrimary
+ \ guifg='#00ff00'
+ \ gui=underline
+ \ ctermfg=155
+ \ cterm=underline
+ autocmd ColorScheme * highlight QuickScopeSecondary
+ \ guifg='#0ffff'
+ \ gui=underline
+ \ ctermfg=81
+ \ cterm=underline
+augroup END
--- /dev/null
+let g:startify_session_dir = '~/.config/nvim/session'
+
+let g:startify_lists = [
+ \ { 'type': 'files', 'header': [' Files'] },
+ \ { 'type': 'dir', 'header': [' Current Directory '. getcwd()] },
+ \ { 'type': 'sessions', 'header': [' Sessions'] },
+ \ { 'type': 'bookmarks', 'header': [' Bookmarks'] },
+ \ ]
+
+let g:startify_bookmarks = [
+ \ { 'in': '~/.config/nvim/init.vim' },
+ \ { 'b': '~/.bashrc' }
+ \ ]
+
+" You can automatically restart a session like this
+let g:startify_session_autoload = 1
+
+let g:startify_change_to_dir = 1
+
+let g:startify_session_delete_buffers = 1
+
+let g:startify_change_to_vcs_root = 1
+
+let g:startify_fortune_use_unicode = 1
+
+let g:startify_session_persistence = 1
+
+let g:startify_enable_special = 0
+
+let g:startify_custom_header = [
+ \ ' __ __ _ ___ ',
+ \ ' \ \/ /___ _______ ______ ____ | | / (_)___ ___ ',
+ \ ' \ / __ \/ ___/ / / / __ `/ __ \ | | / / / __ `__ \',
+ \ ' / / /_/ / / / /_/ / /_/ / /_/ / | |/ / / / / / / /',
+ \ ' /_/\____/_/ \__,_/\__, /\____/ |___/_/_/ /_/ /_/ ',
+ \ ' /____/ ',
+ \]
+
--- /dev/null
+let g:airline_powerline_fonts = 1
+let g:airline#extensions#tabline#enabled = 1
+let g:airline#extensions#branch#enabled = 1
+
+let g:airline_section_z = '%3p%% %3l:%2c'
--- /dev/null
+set background=dark
+colo pop-punk
+let g:airline_theme='pop_punk'
--- /dev/null
+" Autocomplete navigation
+inoremap <expr> <c-j> ("\<C-n>")
+inoremap <expr> <c-k> ("\<C-p>")
+inoremap <expr> <c-l> ("\<Esc>a")
+
+" Buffer navigation
+nnoremap J :bprevious<CR>
+nnoremap K :bnext<CR>
+
+" Window navigation
+nnoremap <C-h> <C-w>h
+nnoremap <C-j> <C-w>j
+nnoremap <C-k> <C-w>k
+nnoremap <C-l> <C-w>l
+
+" Use alt +hjkl to resize windows
+nnoremap <M-H> :vertical resize -2<CR>
+nnoremap <M-J> :resize -2<CR>
+nnoremap <M-K> :resize +2<CR>
+nnoremap <M-L> :vertical resize +2<CR>
+
+" Remap escape
+inoremap jkl <Esc>
+inoremap JKL <Esc>
+
+" Tab changes buffer
+nnoremap <TAB> :bnext<CR>
+nnoremap <S-TAB> :bprevious<CR>
+
+" Sane Y default
+nnoremap Y y$
+
+" add a semicolon
+inoremap <M-;> <Esc>A;
+nnoremap <M-;> A;<Esc>
+
+" add a comma
+inoremap <M-,> <Esc>A,
+nnoremap <M-,> A,<Esc>
+
+" add 3 `
+inoremap <M-`> ```
+
+" add brackets
+inoremap <M-9> <Esc>A()<Left>
+nnoremap <M-9> A()<Left>
+
+inoremap <M-[> <Esc>A[]<Left>
+nnoremap <M-[> A[]<Left>
+
+inoremap <C-M-[> <Esc>A{}<Left>
+nnoremap <C-M-[> A{}<Left>
+
+" Move while in insert mode
+inoremap <M-h> <Left>
+inoremap <M-j> <Down>
+inoremap <M-k> <Up>
+inoremap <M-l> <Right>
+
+inoremap <C-M-h> <C-Left>
+inoremap <C-M-j> <C-Down>
+inoremap <C-M-k> <C-Up>
+inoremap <C-M-l> <C-Right>
+
+" Re-source vim
+nnoremap <M-CR> :source ~/.config/nvim/init.vim<CR>
--- /dev/null
+" Auto-install vim-plug
+if empty(glob('$HOME/.local/share/nvim/site/autoload/plug.vim'))
+ silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
+ \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
+endif
+
+" Plugin List
+call plug#begin()
+
+ " Coc
+ Plug 'neoclide/coc.nvim', {'branch': 'release'}
+
+ " nerdtree
+ Plug 'preservim/nerdtree'
+ Plug 'ryanoasis/vim-devicons'
+ Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
+ Plug 'Xuyuanp/nerdtree-git-plugin'
+ Plug 'PhilRunninger/nerdtree-visual-selection'
+
+ " Bar
+ Plug 'vim-airline/vim-airline'
+ Plug 'vim-airline/vim-airline-themes'
+
+ " Auto pairs for '(' '[' '{'
+ Plug 'jiangmiao/auto-pairs'
+
+ " Surround with '(' '[' '{'
+ Plug 'tpope/vim-surround'
+
+ " Highlight for scope f and F
+ Plug 'unblevable/quick-scope'
+
+ " Mass comment / uncomment
+ Plug 'tpope/vim-commentary'
+
+ " Floaterm
+ Plug 'voldikss/vim-floaterm'
+
+ " Startify
+ Plug 'mhinz/vim-startify'
+
+ " Signify --- Git
+ if has('nvim') || has('patch-8.0.902')
+ Plug 'mhinz/vim-signify'
+ else
+ Plug 'mhinz/vim-signify', { 'branch': 'legacy' }
+ endif
+
+ " Fugitive --- Git
+ Plug 'tpope/vim-fugitive'
+
+ " Themes
+ " PaperColor
+ Plug 'NLKNguyen/papercolor-theme'
+
+ " Pop-punk
+ Plug 'bignimbus/pop-punk.vim'
+
+ " Jinja Support
+ Plug 'lepture/vim-jinja'
+
+ " For Python f string highlighting
+ Plug 'sheerun/vim-polyglot'
+
+ " Assembly
+ Plug 'Shirk/vim-gas'
+
+call plug#end()
+
+" Coc List
+let g:coc_global_extensions = [
+ \ 'coc-clangd',
+ \ 'coc-clang-format-style-options',
+ \ 'coc-cmake',
+ \ 'coc-css',
+ \ 'coc-cssmodules',
+ \ 'coc-diagnostic',
+ \ 'coc-docker',
+ \ 'coc-json',
+ \ 'coc-go',
+ \ 'coc-highlight',
+ \ 'coc-html',
+ \ 'coc-htmldjango',
+ \ 'coc-html-css-support',
+ \ 'coc-jedi',
+ \ 'coc-json',
+ \ 'coc-markdownlint',
+ \ '@yaegassy/coc-nginx',
+ \ 'coc-rls',
+ \ 'coc-toml',
+ \ 'coc-tsserver',
+ \ 'coc-xml',
+ \ 'coc-yaml',
+\]
--- /dev/null
+syntax enable
+
+set encoding=utf-8
+set fileencoding=utf-8
+
+set mouse=a
+
+set shiftwidth=4
+set smarttab
+set expandtab
+set smartindent
+set autoindent
+
+set colorcolumn=88
+set nowrap
+set linebreak
+augroup Markdown
+ autocmd!
+ autocmd FileType markdown set wrap
+augroup END
+set number relativenumber
+set hidden
+set nohlsearch
+set guicursor=i:block
+
+au BufEnter * set fo-=c
+au BufEnter * set fo-=o
+
+set clipboard=unnamedplus
+
+set termguicolors
+
+set nobackup
+set nowritebackup
+set updatetime=500
+set shortmess+=c
+
+augroup FileJinjaType
+ autocmd!
+ autocmd BufNewFile,BufRead *.html :set filetype=jinja.html
+augroup END
+
+augroup Format
+ autocmd!
+ autocmd BufWritePre *.html :normal mZgg=G`Z:delmarks Z
+augroup END
+++ /dev/null
-au FileType jinja.html let b:AutoPairs = AutoPairsDefine({'{%' : '%}'})
+++ /dev/null
-" Coc Mappings
-
-" Use `[g` and `]g` to navigate diagnostics
-" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
-nmap <silent> [g <Plug>(coc-diagnostic-prev)
-nmap <silent> ]g <Plug>(coc-diagnostic-next)
-
-" GoTo code navigation.
-nmap <silent> gd <Plug>(coc-definition)
-nmap <silent> gy <Plug>(coc-type-definition)
-nmap <silent> gi <Plug>(coc-implementation)
-nmap <silent> gr <Plug>(coc-references)
-
-" Formatting selected code
-xmap <leader>f <Plug>(coc-format-selected)
-nmap <leader>f <Plug>(coc-format-selected)
-
-augroup mygroup
- autocmd!
- " Setup formatexpr specified filetype(s).
- autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
- " Update signature help on jump placeholder.
- autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
-augroup end
-
-" Symbol renaming
-nnoremap <leader>rn <Plug>(coc-rename)
-
-" Use tab for trigger completion with characters ahead and navigate.
-" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
-" other plugin before putting this into your config.
-inoremap <silent><expr> <TAB>
- \ pumvisible() ? "\<C-n>" :
- \ CheckBackspace() ? "\<TAB>" :
- \ coc#refresh()
-inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
-
-function! CheckBackspace() abort
- let col = col('.') - 1
- return !col || getline('.')[col - 1] =~# '\s'
-endfunction
-
-" Use <CR> to trigger completion
-inoremap <silent><expr> <CR> pumvisible() ? "<Right>" : "\r"
-
+++ /dev/null
-" Highlight the symbol and its references when holding the cursor
-autocmd CursorHold * silent call CocActionAsync('highlight')
-
+++ /dev/null
-" Floaterm
-let g:floaterm_keymap_toggle = '<F1>'
-let g:floaterm_keymap_prev = '<F9>'
-let g:floaterm_keymap_next = '<F10>'
-let g:floaterm_keymap_new = '<F11>'
-let g:floaterm_keymap_kill = '<F12>'
+++ /dev/null
-nnoremap <leader>n :NERDTree<CR>
-nnoremap <leader>e :NERDTreeToggle<CR>
-nnoremap <leader>f :NERDTreeFocus<CR>
+++ /dev/null
-let g:NERDTreeGitStatusUseNerdFonts = 1
-let g:NERDTreeHighlightCursorline = 0
-let g:NERDTreeShowHidden = 0
-
-let g:NERDTreeIgnore = [
- \ '__pycache__',
- \ '.\.so',
- \ 'build',
- \ 'develop-eggs',
- \ 'dist',
- \ 'downloads',
- \ 'eggs',
- \ '.\.egg-info',
- \ '__pypackages__',
- \ '\.env',
- \ '\.venv',
- \ 'env',
- \ 'venv',
- \ 'ENV',
- \ 'env\.bak',
- \ 'venv\.bak'
-\]
+++ /dev/null
-augroup qs_colors
- autocmd!
- autocmd ColorScheme * highlight QuickScopePrimary guifg='#ff00ff' gui=underline ctermfg=155 cterm=underline
- autocmd ColorScheme * highlight QuickScopeSecondary guifg='#aa0000' gui=underline ctermfg=81 cterm=underline
-augroup END
+++ /dev/null
-let g:startify_session_dir = '~/.config/nvim/session'
-
-let g:startify_lists = [
- \ { 'type': 'files', 'header': [' Files'] },
- \ { 'type': 'dir', 'header': [' Current Directory '. getcwd()] },
- \ { 'type': 'sessions', 'header': [' Sessions'] },
- \ { 'type': 'bookmarks', 'header': [' Bookmarks'] },
- \ ]
-
-let g:startify_bookmarks = [
- \ { 'in': '~/.config/nvim/init.vim' },
- \ { 'b': '~/.bashrc' }
- \ ]
-
-" You can automatically restart a session like this
-let g:startify_session_autoload = 1
-
-let g:startify_change_to_dir = 1
-
-let g:startify_session_delete_buffers = 1
-
-let g:startify_change_to_vcs_root = 1
-
-let g:startify_fortune_use_unicode = 1
-
-let g:startify_session_persistence = 1
-
-let g:startify_enable_special = 0
-
-let g:startify_custom_header = [
- \ ' __ __ _ ___ ',
- \ ' \ \/ /___ _______ ______ ____ | | / (_)___ ___ ',
- \ ' \ / __ \/ ___/ / / / __ `/ __ \ | | / / / __ `__ \',
- \ ' / / /_/ / / / /_/ / /_/ / /_/ / | |/ / / / / / / /',
- \ ' /_/\____/_/ \__,_/\__, /\____/ |___/_/_/ /_/ /_/ ',
- \ ' /____/ ',
- \]
-
+++ /dev/null
-let g:airline_powerline_fonts = 1
-let g:airline#extensions#tabline#enabled = 1
-let g:airline#extensions#branch#enabled = 1
-
-let g:airline_section_z = '%3p%% %3l:%2c'
+++ /dev/null
-set background=dark
-colo pop-punk
-let g:airline_theme='pop_punk'
+++ /dev/null
-" Autocomplete navigation
-inoremap <expr> <c-j> ("\<C-n>")
-inoremap <expr> <c-k> ("\<C-p>")
-inoremap <expr> <c-l> ("\<Esc>a")
-
-" Buffer navigation
-nnoremap J :bprevious<CR>
-nnoremap K :bnext<CR>
-
-" Window navigation
-nnoremap <C-h> <C-w>h
-nnoremap <C-j> <C-w>j
-nnoremap <C-k> <C-w>k
-nnoremap <C-l> <C-w>l
-
-" Use alt +hjkl to resize windows
-nnoremap <M-h> :vertical resize -2<CR>
-nnoremap <M-j> :resize -2<CR>
-nnoremap <M-k> :resize +2<CR>
-nnoremap <M-l> :vertical resize +2<CR>
-
-" Remap escape
-inoremap jkl <Esc>
-inoremap JKL <Esc>
-
-" Tab changes buffer
-nnoremap <TAB> :bnext<CR>
-nnoremap <S-TAB> :bprevious<CR>
-
-" Sane Y default
-nnoremap Y y$
-
-" add a semicolon
-inoremap <M-;> <Esc>A;
-nnoremap <M-;> A;<Esc>
-
-" add a comma
-inoremap <M-,> <Esc>A,
-nnoremap <M-,> A,<Esc>
-
-" add 3 `
-inoremap <M-`> ```
-
-" add brackets
-inoremap <M-9> <Esc>A()<Left>
-nnoremap <M-9> A()<Left>
-
-inoremap <M-[> <Esc>A[]<Left>
-nnoremap <M-[> A[]<Left>
-
-inoremap <C-M-[> <Esc>A{}<Left>
-nnoremap <C-M-[> A{}<Left>
-
-" Move while in insert mode
-inoremap <M-h> <Left>
-inoremap <M-j> <Down>
-inoremap <M-k> <Up>
-inoremap <M-l> <Right>
-
-inoremap <C-M-h> <C-Left>
-inoremap <C-M-j> <C-Down>
-inoremap <C-M-k> <C-Up>
-inoremap <C-M-l> <C-Right>
-
-" Re-source vim
-inoremap <M-CR> :source ~/.config/nvim/init.vim
+++ /dev/null
-" Auto-install vim-plug
-if empty(glob('$HOME/.local/share/nvim/site/autoload/plug.vim'))
- silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
- \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
-endif
-
-" Plugin List
-call plug#begin()
-
- " Coc
- Plug 'neoclide/coc.nvim', {'branch': 'release'}
-
- " nerdtree
- Plug 'preservim/nerdtree'
- Plug 'ryanoasis/vim-devicons'
- Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
- Plug 'Xuyuanp/nerdtree-git-plugin'
- Plug 'PhilRunninger/nerdtree-visual-selection'
-
- " Bar
- Plug 'vim-airline/vim-airline'
- Plug 'vim-airline/vim-airline-themes'
-
- " Auto pairs for '(' '[' '{'
- Plug 'jiangmiao/auto-pairs'
-
- " Surround with '(' '[' '{'
- Plug 'tpope/vim-surround'
-
- " Highlight for scope f and F
- Plug 'unblevable/quick-scope'
-
- " Mass comment / uncomment
- Plug 'tpope/vim-commentary'
-
- " Floaterm
- Plug 'voldikss/vim-floaterm'
-
- " Startify
- Plug 'mhinz/vim-startify'
-
- " Signify --- Git
- if has('nvim') || has('patch-8.0.902')
- Plug 'mhinz/vim-signify'
- else
- Plug 'mhinz/vim-signify', { 'branch': 'legacy' }
- endif
-
- " Fugitive --- Git
- Plug 'tpope/vim-fugitive'
-
- " Themes
- " PaperColor
- Plug 'NLKNguyen/papercolor-theme'
-
- " Pop-punk
- Plug 'bignimbus/pop-punk.vim'
-
- " Jinja Support
- Plug 'lepture/vim-jinja'
-
- " For Python f string highlighting
- Plug 'sheerun/vim-polyglot'
-
-call plug#end()
-
-" Coc List
-let g:coc_global_extensions = [
- \ 'coc-clangd',
- \ 'coc-clang-format-style-options',
- \ 'coc-cmake',
- \ 'coc-css',
- \ 'coc-cssmodules',
- \ 'coc-diagnostic',
- \ 'coc-docker',
- \ 'coc-json',
- \ 'coc-go',
- \ 'coc-highlight',
- \ 'coc-html',
- \ 'coc-htmldjango',
- \ 'coc-html-css-support',
- \ 'coc-jedi',
- \ 'coc-json',
- \ 'coc-markdownlint',
- \ '@yaegassy/coc-nginx',
- \ 'coc-rls',
- \ 'coc-toml',
- \ 'coc-tsserver',
- \ 'coc-xml',
- \ 'coc-yaml',
-\]
+++ /dev/null
-syntax enable
-
-set encoding=utf-8
-set fileencoding=utf-8
-
-set mouse=a
-
-set shiftwidth=4
-set smarttab
-set expandtab
-set smartindent
-set autoindent
-
-set colorcolumn=88
-set nowrap
-set linebreak
-augroup Markdown
- autocmd!
- autocmd FileType markdown set wrap
-augroup END
-set number relativenumber
-set hidden
-set nohlsearch
-
-au BufEnter * set fo-=c
-au BufEnter * set fo-=o
-
-set clipboard=unnamedplus
-
-set termguicolors
-
-set nobackup
-set nowritebackup
-set updatetime=200
-set shortmess+=c
-
-augroup FileJinjaType
- autocmd!
- autocmd BufNewFile,BufRead *.html :set filetype=jinja.html
-augroup END
-
-augroup Format
- autocmd!
- autocmd BufWritePre *.html :normal mZgg=G`Z:delmarks Z
-augroup END