Compare commits

...

5 Commits

Author SHA1 Message Date
Ali Can Zeybek
d1cc10b058 sync 2022-12-19 19:48:38 +03:00
d1862f0d15 git and colorscheme 2022-09-30 19:18:15 +03:00
ab7626b330 added gitignore 2022-09-30 19:17:58 +03:00
45ede688d7 added gitignore 2022-09-30 19:16:32 +03:00
c1e8b4b094 added gitignore 2022-09-30 19:15:36 +03:00
7 changed files with 114 additions and 64 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
plugin
plugin/*
packer_compiled.lua

View File

@@ -5,7 +5,7 @@ end
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
local servers = { "jsonls", "sumneko_lua" } local servers = { "jsonls", "sumneko_lua" , "pyright", "gopls", "ccls"}
lsp_installer.setup({ lsp_installer.setup({
ensure_installed = servers, ensure_installed = servers,

View File

@@ -16,7 +16,7 @@ null_ls.setup({
formatting.prettier.with({ extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" } }), formatting.prettier.with({ extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" } }),
formatting.black.with({ extra_args = { "--fast" } }), formatting.black.with({ extra_args = { "--fast" } }),
formatting.stylua, formatting.stylua,
diagnostics.flake8, --diagnostics.flake8,
diagnostics.cppcheck, diagnostics.cppcheck,
code_actions.refactoring code_actions.refactoring
}, },

View File

@@ -19,12 +19,12 @@ local options = {
updatetime = 300, -- faster completion (4000ms default) updatetime = 300, -- faster completion (4000ms default)
writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
expandtab = true, -- convert tabs to spaces expandtab = true, -- convert tabs to spaces
shiftwidth = 2, -- the number of spaces inserted for each indentation shiftwidth = 4, -- the number of spaces inserted for each indentation
tabstop = 4, -- insert 2 spaces for a tab tabstop = 4, -- insert 2 spaces for a tab
number = true, -- set numbered lines number = true, -- set numbered lines
relativenumber = true, -- set relative numbered lines relativenumber = true, -- set relative numbered lines
numberwidth = 4, -- set number column width to 2 {default 4} numberwidth = 4, -- set number column width to 2 {default 4}
wrap = false, -- display lines as one long line wrap = true, -- display lines as one long line
scrolloff = 12, -- is one of my fav scrolloff = 12, -- is one of my fav
sidescrolloff = 8, sidescrolloff = 8,
} }

View File

@@ -33,50 +33,52 @@ end
return packer.startup(function(use) return packer.startup(function(use)
-- General Libs -- General Libs
use "wbthomason/packer.nvim" -- Have packer manage itself use "wbthomason/packer.nvim" -- Have packer manage itself
use "nvim-lua/popup.nvim" -- Popup API of vim in Neovim use "nvim-lua/popup.nvim" -- Popup API of vim in Neovim
use "nvim-lua/plenary.nvim" -- Lua lib required by other plugins use "nvim-lua/plenary.nvim" -- Lua lib required by other plugins
-- Colorschemes
use "sainnhe/gruvbox-material"
use {'shaunsingh/oxocarbon.nvim', run = './install.sh'}
-- Colorschemes --cmp plugins
use "sainnhe/gruvbox-material" use "hrsh7th/nvim-cmp" -- The completion plugin
use "hrsh7th/cmp-buffer" -- buffer completions
use "hrsh7th/cmp-path" -- path completions
use "saadparwaiz1/cmp_luasnip" -- snippet completions
use "hrsh7th/cmp-nvim-lsp"
use "hrsh7th/cmp-nvim-lua"
--cmp plugins -- snippets
use "hrsh7th/nvim-cmp" -- The completion plugin use "L3MON4D3/LuaSnip" --snippet engine
use "hrsh7th/cmp-buffer" -- buffer completions use "rafamadriz/friendly-snippets" -- a bunch of snippets to use
use "hrsh7th/cmp-path" -- path completions
use "saadparwaiz1/cmp_luasnip" -- snippet completions
use "hrsh7th/cmp-nvim-lsp"
use "hrsh7th/cmp-nvim-lua"
-- snippets -- LSP
use "L3MON4D3/LuaSnip" --snippet engine use "neovim/nvim-lspconfig" -- enable LSP
use "rafamadriz/friendly-snippets" -- a bunch of snippets to use use "williamboman/nvim-lsp-installer" -- simple to use language server installer
use "jose-elias-alvarez/null-ls.nvim" -- for formatters and linters
-- LSP -- Telescope
use "neovim/nvim-lspconfig" -- enable LSP use "nvim-telescope/telescope.nvim"
use "williamboman/nvim-lsp-installer" -- simple to use language server installer
use "jose-elias-alvarez/null-ls.nvim" -- for formatters and linters
-- Telescope -- TreeSitter
use "nvim-telescope/telescope.nvim" use { "nvim-treesitter/nvim-treesitter" , run = "TSUpdate",}
-- TreeSitter -- Git Stuff
use { "nvim-treesitter/nvim-treesitter" , run = "TSUpdate",} use "lewis6991/gitsigns.nvim"
use "f-person/git-blame.nvim"
use "tpope/vim-fugitive"
-- nvim-tree
use "kyazdani42/nvim-tree.lua"
-- Git Stuff -- toggleterm
use "lewis6991/gitsigns.nvim" use "akinsho/toggleterm.nvim"
-- lualine
use "nvim-lualine/lualine.nvim"
-- nvim-tree --markdown
use "kyazdani42/nvim-tree.lua" use({ "iamcco/markdown-preview.nvim", run = "cd app && npm install", setup = function() vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" }, })
-- toggleterm
use "akinsho/toggleterm.nvim"
-- lualine
use "nvim-lualine/lualine.nvim"
if PACKER_BOOTSTRAP then if PACKER_BOOTSTRAP then
require("packer").sync() require("packer").sync()
end end

View File

@@ -9,22 +9,25 @@ vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function() local no_errors, error_msg = pcall(function()
local time _G._packer = _G._packer or {}
local profile_info _G._packer.inside_compile = true
local should_profile = false
if should_profile then local time
local hrtime = vim.loop.hrtime local profile_info
profile_info = {} local should_profile = false
time = function(chunk, start) if should_profile then
if start then local hrtime = vim.loop.hrtime
profile_info[chunk] = hrtime() profile_info = {}
else time = function(chunk, start)
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 if start then
end profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end end
else
time = function(chunk, start) end
end end
else
time = function(chunk, start) end
end
local function save_profiles(threshold) local function save_profiles(threshold)
local sorted_times = {} local sorted_times = {}
@@ -38,8 +41,10 @@ local function save_profiles(threshold)
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end end
end end
if threshold then
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
end
_G._packer = _G._packer or {}
_G._packer.profile_output = results _G._packer.profile_output = results
end end
@@ -104,6 +109,11 @@ _G.packer_plugins = {
path = "/home/alican/.local/share/nvim/site/pack/packer/start/friendly-snippets", path = "/home/alican/.local/share/nvim/site/pack/packer/start/friendly-snippets",
url = "https://github.com/rafamadriz/friendly-snippets" url = "https://github.com/rafamadriz/friendly-snippets"
}, },
["git-blame.nvim"] = {
loaded = true,
path = "/home/alican/.local/share/nvim/site/pack/packer/start/git-blame.nvim",
url = "https://github.com/f-person/git-blame.nvim"
},
["gitsigns.nvim"] = { ["gitsigns.nvim"] = {
loaded = true, loaded = true,
path = "/home/alican/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", path = "/home/alican/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
@@ -119,6 +129,13 @@ _G.packer_plugins = {
path = "/home/alican/.local/share/nvim/site/pack/packer/start/lualine.nvim", path = "/home/alican/.local/share/nvim/site/pack/packer/start/lualine.nvim",
url = "https://github.com/nvim-lualine/lualine.nvim" url = "https://github.com/nvim-lualine/lualine.nvim"
}, },
["markdown-preview.nvim"] = {
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/alican/.local/share/nvim/site/pack/packer/opt/markdown-preview.nvim",
url = "https://github.com/iamcco/markdown-preview.nvim"
},
["null-ls.nvim"] = { ["null-ls.nvim"] = {
loaded = true, loaded = true,
path = "/home/alican/.local/share/nvim/site/pack/packer/start/null-ls.nvim", path = "/home/alican/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
@@ -149,6 +166,11 @@ _G.packer_plugins = {
path = "/home/alican/.local/share/nvim/site/pack/packer/start/nvim-treesitter", path = "/home/alican/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter" url = "https://github.com/nvim-treesitter/nvim-treesitter"
}, },
["oxocarbon.nvim"] = {
loaded = true,
path = "/home/alican/.local/share/nvim/site/pack/packer/start/oxocarbon.nvim",
url = "https://github.com/shaunsingh/oxocarbon.nvim"
},
["packer.nvim"] = { ["packer.nvim"] = {
loaded = true, loaded = true,
path = "/home/alican/.local/share/nvim/site/pack/packer/start/packer.nvim", path = "/home/alican/.local/share/nvim/site/pack/packer/start/packer.nvim",
@@ -173,10 +195,33 @@ _G.packer_plugins = {
loaded = true, loaded = true,
path = "/home/alican/.local/share/nvim/site/pack/packer/start/toggleterm.nvim", path = "/home/alican/.local/share/nvim/site/pack/packer/start/toggleterm.nvim",
url = "https://github.com/akinsho/toggleterm.nvim" url = "https://github.com/akinsho/toggleterm.nvim"
},
["vim-fugitive"] = {
loaded = true,
path = "/home/alican/.local/share/nvim/site/pack/packer/start/vim-fugitive",
url = "https://github.com/tpope/vim-fugitive"
} }
} }
time([[Defining packer_plugins]], false) time([[Defining packer_plugins]], false)
-- Setup for: markdown-preview.nvim
time([[Setup for markdown-preview.nvim]], true)
try_loadstring("\27LJ\2\n=\0\0\2\0\4\0\0056\0\0\0009\0\1\0005\1\3\0=\1\2\0K\0\1\0\1\2\0\0\rmarkdown\19mkdp_filetypes\6g\bvim\0", "setup", "markdown-preview.nvim")
time([[Setup for markdown-preview.nvim]], false)
vim.cmd [[augroup packer_load_aucmds]]
vim.cmd [[au!]]
-- Filetype lazy-loads
time([[Defining lazy-load filetype autocommands]], true)
vim.cmd [[au FileType markdown ++once lua require("packer.load")({'markdown-preview.nvim'}, { ft = "markdown" }, _G.packer_plugins)]]
time([[Defining lazy-load filetype autocommands]], false)
vim.cmd("augroup END")
_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then
vim.cmd("doautocmd BufRead")
end
_G._packer.needs_bufread = false
if should_profile then save_profiles() end if should_profile then save_profiles() end
end) end)