Configure and fix syntax
This commit is contained in:
parent
cd2169b12e
commit
c65ba7a9f6
10
ftplugin/c.lua
Normal file
10
ftplugin/c.lua
Normal file
@ -0,0 +1,10 @@
|
||||
vim.g.cino = "N-s"
|
||||
vim.o.textwidth = 80
|
||||
|
||||
vim.g.cpp_attributes_highlight = true
|
||||
vim.g.cpp_member_highlight = true
|
||||
vim.g.cpp_simple_highlight = true
|
||||
|
||||
-- remove white spaces at end of line
|
||||
vim.api.nvim_create_autocmd({'BufWritePre'}, {command = '%s;\\s\\+$;;e'})
|
||||
|
||||
5
ftplugin/lua.lua
Normal file
5
ftplugin/lua.lua
Normal file
@ -0,0 +1,5 @@
|
||||
vim.o.textwidth = 100
|
||||
|
||||
-- remove white spaces at end of line
|
||||
vim.api.nvim_create_autocmd({'BufWritePre'}, {command = '%s;\\s\\+$;;e'})
|
||||
|
||||
5
ftplugin/rust.lua
Normal file
5
ftplugin/rust.lua
Normal file
@ -0,0 +1,5 @@
|
||||
vim.o.textwidth = 100
|
||||
|
||||
-- remove white spaces at end of line
|
||||
vim.api.nvim_create_autocmd({'BufWritePre'}, {command = '%s;\\s\\+$;;e'})
|
||||
|
||||
3
init.lua
3
init.lua
@ -1,10 +1,11 @@
|
||||
-- Set global configuration
|
||||
vim.g.mapleader = ","
|
||||
vim.o.number = true
|
||||
vim.o.colorcolumn = '+1'
|
||||
|
||||
-- Set indentation options
|
||||
vim.o.tabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.expandtab = true
|
||||
|
||||
-- Disable unused providers
|
||||
|
||||
@ -41,7 +41,7 @@ local function manage_plugins()
|
||||
vim.cmd("colorscheme nightfox")
|
||||
end
|
||||
},
|
||||
|
||||
|
||||
-- COQ
|
||||
["https://github.com/ms-jpq/coq_nvim.git"] = {},
|
||||
["https://github.com/ms-jpq/coq.artifacts.git"] = {
|
||||
@ -60,10 +60,10 @@ local function manage_plugins()
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
-- Hover actions
|
||||
vim.keymap.set("n", "<C-space>",
|
||||
vim.keymap.set("n", "<C-space>",
|
||||
rt.hover_actions.hover_actions, { buffer = bufnr })
|
||||
-- Code action groups
|
||||
vim.keymap.set("n", "<Leader>a",
|
||||
vim.keymap.set("n", "<Leader>a",
|
||||
rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||
end,
|
||||
},
|
||||
@ -80,24 +80,27 @@ local function manage_plugins()
|
||||
vim.cmd('set signcolumn=number')
|
||||
end
|
||||
},
|
||||
|
||||
-- Syntax highlight
|
||||
["https://github.com/bfrg/vim-cpp-modern.git"] = {},
|
||||
}
|
||||
|
||||
local manager = require("plogins").manage(plugins)
|
||||
|
||||
vim.api.nvim_create_user_command("PloginsUpgrade",
|
||||
vim.api.nvim_create_user_command("PloginsUpgrade",
|
||||
manager.upgrade, {})
|
||||
vim.api.nvim_create_user_command("PloginsAutoremove",
|
||||
vim.api.nvim_create_user_command("PloginsAutoremove",
|
||||
manager.autoremove, {})
|
||||
end
|
||||
|
||||
local plogins_source = "https://github.com/faerryn/plogins.nvim.git"
|
||||
local plogins_name = plogins_source:gsub("/", "%%")
|
||||
local plogins_dir = ("%s/site/pack/plogins/opt/%s"):format((vim.fn.stdpath("data")),
|
||||
local plogins_dir = ("%s/site/pack/plogins/opt/%s"):format((vim.fn.stdpath("data")),
|
||||
plogins_name)
|
||||
|
||||
if not vim.loop.fs_stat(plogins_dir) then
|
||||
vim.loop.spawn("git",
|
||||
{ args = { "clone", "--depth", "1", plogins_source, plogins_dir } },
|
||||
vim.loop.spawn("git",
|
||||
{ args = { "clone", "--depth", "1", plogins_source, plogins_dir } },
|
||||
function(code, signal)
|
||||
vim.defer_fn(function()
|
||||
vim.cmd(("packadd %s"):format(vim.fn.fnameescape(plogins_name)))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user