fix nvim
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
|
||||
"LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
@@ -7,15 +7,15 @@
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a979821a975897b88493843301950c456a725982" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "63a3c6a80538de1003373a619e29aeda27809ad3" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
"mason.nvim": { "branch": "main", "commit": "b03fb0f20bc1d43daf558cda981a2be22e73ac42" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||
"nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
|
||||
"nvim-lsp-file-operations": { "branch": "master", "commit": "b9c795d3973e8eec22706af14959bc60c579e771" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "4daa1436595dbce4c6151f75c38a0d855796c554" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "c588db330592fa477a70d2fee6ba20a57194bdc3" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }
|
||||
}
|
||||
|
||||
@@ -1,39 +1,25 @@
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter', brench = 'master',
|
||||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
lazy = false,
|
||||
build = ':TSUpdate',
|
||||
config = function()
|
||||
local treesitter = require('nvim-treesitter.configs')
|
||||
treesitter.setup({
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
ensure_installed = {
|
||||
'vim',
|
||||
'lua',
|
||||
'cmake',
|
||||
'cpp',
|
||||
'c',
|
||||
'bash',
|
||||
'javascript',
|
||||
'typescript',
|
||||
'tsx',
|
||||
'json',
|
||||
'html',
|
||||
'vue',
|
||||
'css',
|
||||
'dockerfile',
|
||||
'markdown',
|
||||
'yaml'
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = '<C-space>',
|
||||
node_incremental = '<C-space>',
|
||||
-- scope_incremental = false,
|
||||
-- node_decremental = '<bs>'
|
||||
}
|
||||
}
|
||||
require('nvim-treesitter').install({
|
||||
'vim',
|
||||
'lua',
|
||||
'cmake',
|
||||
'cpp',
|
||||
'c',
|
||||
'bash',
|
||||
'javascript',
|
||||
'typescript',
|
||||
'tsx',
|
||||
'json',
|
||||
'html',
|
||||
'vue',
|
||||
'css',
|
||||
'dockerfile',
|
||||
'markdown',
|
||||
'yaml'
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
-- Encoding.
|
||||
vim.scriptencoding = 'utf-8'
|
||||
vim.o.encoding = 'utf-8'
|
||||
vim.o.fileencoding = 'utf-8'
|
||||
|
||||
-- Backups.
|
||||
vim.o.backup = false
|
||||
vim.o.swapfile = false
|
||||
|
||||
-- Lines.
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
vim.o.colorcolumn = '80'
|
||||
vim.o.signcolumn = 'yes'
|
||||
vim.o.cursorline = true
|
||||
vim.o.guicursor = ''
|
||||
|
||||
-- Tabs.
|
||||
vim.o.tabstop = 2
|
||||
vim.o.shiftwidth = 2
|
||||
|
||||
-- Etc.
|
||||
vim.o.mouse = ''
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
|
||||
-- View.
|
||||
vim.g.mapleader = ' '
|
||||
-- vim.g.netrw_liststyle = 3
|
||||
vim.o.termguicolors = true
|
||||
|
||||
vim.o.list = true
|
||||
vim.opt.listchars:append 'space:·'
|
||||
vim.opt.listchars:append 'tab:┊ '
|
||||
-- vim.opt.listchars:append 'eol:↴'
|
||||
|
||||
-- Mappings tabs.
|
||||
vim.keymap.set('n', '<C-h>', ':-tabmove<CR>')
|
||||
vim.keymap.set('n', '<C-l>', ':+tabmove<CR>')
|
||||
|
||||
-- Mappings buffers.
|
||||
vim.keymap.set('n', '<leader>k', ':bn<CR>')
|
||||
vim.keymap.set('n', '<leader>j', ':bp<CR>')
|
||||
|
||||
-- Move cursour vertical.
|
||||
vim.keymap.set('n', '<C-d>', '<C-d>zz')
|
||||
vim.keymap.set('n', '<C-u>', '<C-u>zz')
|
||||
|
||||
-- Diagnostic keymaps.
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
|
||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float)
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist)
|
||||
@@ -1,2 +0,0 @@
|
||||
require('axp.base')
|
||||
require('axp.manager.packer')
|
||||
@@ -1,54 +0,0 @@
|
||||
-- Download packer.
|
||||
local ensure_packer = function()
|
||||
local fn = vim.fn
|
||||
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
print('Download packer...')
|
||||
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- Bootstrap packer.
|
||||
local packer_bootstrap = ensure_packer()
|
||||
|
||||
-- Chek packer.
|
||||
local status, packer = pcall(require, 'packer')
|
||||
if (not status) then
|
||||
print('Oops. Packer is not installed!')
|
||||
return
|
||||
end
|
||||
|
||||
-- Init packer.
|
||||
packer.init({
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require('packer.util').float({ border = 'single' })
|
||||
end
|
||||
}
|
||||
})
|
||||
|
||||
-- Plugins.
|
||||
local plugins = require('axp.plugins')
|
||||
|
||||
-- Startup packer.
|
||||
packer.startup(function(use)
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
-- Use pludins.
|
||||
for _, plugin in ipairs(plugins.list) do
|
||||
use(plugin)
|
||||
end
|
||||
|
||||
-- Automatically set up your configuration after cloning packer.nvim
|
||||
-- Put this at the end after all plugins
|
||||
if packer_bootstrap then
|
||||
print('Packer sync...')
|
||||
require('packer').sync()
|
||||
end
|
||||
end)
|
||||
|
||||
-- Init plugins.
|
||||
plugins.init()
|
||||
@@ -1,2 +0,0 @@
|
||||
local status, autopairs = pcall(require, 'nvim-autopairs')
|
||||
if status then autopairs.setup {} end
|
||||
@@ -1,8 +0,0 @@
|
||||
local status, ibl = pcall(require, 'ibl')
|
||||
if (not status) then return end
|
||||
|
||||
ibl.setup {
|
||||
indent = {
|
||||
char = '┊'
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
local status, comment = pcall(require, 'Comment')
|
||||
if (status) then comment.setup {} end
|
||||
@@ -1,53 +0,0 @@
|
||||
local M = {}
|
||||
|
||||
M.list = {
|
||||
-- Common.
|
||||
'nvim-lua/plenary.nvim',
|
||||
|
||||
-- Etc.
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
'nvim-telescope/telescope.nvim',
|
||||
'windwp/nvim-autopairs',
|
||||
'numToStr/Comment.nvim',
|
||||
|
||||
-- View.
|
||||
'EdenEast/nightfox.nvim',
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
|
||||
-- Lsp.
|
||||
'neovim/nvim-lspconfig',
|
||||
'williamboman/mason.nvim',
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
|
||||
--- Null-ls.
|
||||
-- 'jose-elias-alvarez/null-ls.nvim',
|
||||
|
||||
-- Autocompletion.
|
||||
'L3MON4D3/LuaSnip',
|
||||
'hrsh7th/nvim-cmp'
|
||||
}
|
||||
|
||||
M.init = function()
|
||||
-- Etc.
|
||||
require('axp.plugins.autopairs')
|
||||
require('axp.plugins.comment')
|
||||
require('axp.plugins.telescope')
|
||||
require('axp.plugins.treesitter')
|
||||
|
||||
-- View.
|
||||
require('axp.plugins.nightfox')
|
||||
require('axp.plugins.blankline')
|
||||
|
||||
-- Lsp.
|
||||
require('axp.plugins.lsp')
|
||||
|
||||
-- Null-ls.
|
||||
-- require('axp.plugins.null-ls')
|
||||
|
||||
-- Autocompletion
|
||||
require('axp.plugins.luasnip')
|
||||
require('axp.plugins.nvim-cmp')
|
||||
end
|
||||
|
||||
return M
|
||||
@@ -1,79 +0,0 @@
|
||||
-- Check Lspconfig.
|
||||
-- local status_lspconfig, lspconfig = pcall(require, 'lspconfig')
|
||||
-- if (not status_lspconfig) then return end
|
||||
|
||||
-- Check Mason.
|
||||
local status_mason, mason = pcall(require, 'mason')
|
||||
if (not status_mason) then return end
|
||||
|
||||
-- Check Mason lsp installer.
|
||||
local status_mason_lspconfig, mason_lspconfig = pcall(require, 'mason-lspconfig')
|
||||
if (not status_mason_lspconfig) then return end
|
||||
|
||||
-- Config servers.
|
||||
local servers = {
|
||||
'ts_ls',
|
||||
'lua_ls',
|
||||
'bashls',
|
||||
'cmake',
|
||||
'html',
|
||||
'dockerls',
|
||||
'jsonls',
|
||||
'yamlls',
|
||||
'graphql'
|
||||
}
|
||||
|
||||
vim.lsp.config('lua_ls', {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
diagnostics = {
|
||||
globals = {
|
||||
'vim',
|
||||
'require',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
vim.lsp.config('ts_ls', {
|
||||
init_options = {
|
||||
plugins = {
|
||||
{
|
||||
name = '@vue/typescript-plugin',
|
||||
location = '/home/antoxa/.nvm/versions/node/v22.12.0/lib/node_modules/@vue/typescript-plugin',
|
||||
languages = { 'vue' }
|
||||
}
|
||||
}
|
||||
},
|
||||
settings = {
|
||||
typescript = {
|
||||
tsserver = {
|
||||
useSyntaxServer = false,
|
||||
},
|
||||
inlayHints = {
|
||||
includeInlayParameterNameHints = 'all',
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
|
||||
includeInlayFunctionParameterTypeHints = true,
|
||||
includeInlayVariableTypeHints = true,
|
||||
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
filetypes = { 'javascript', 'typescript', 'vue' }
|
||||
})
|
||||
|
||||
-- Mason.
|
||||
mason.setup {}
|
||||
|
||||
-- Mason lsp installer.
|
||||
mason_lspconfig.setup {
|
||||
ensure_installed = servers,
|
||||
automatic_enable = true
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
local status_luasnip, ls = pcall(require, 'luasnip')
|
||||
if (not status_luasnip) then return end
|
||||
|
||||
-- Init.
|
||||
ls.config.set_config {}
|
||||
|
||||
-- Snippets.
|
||||
local snippets = require 'axp.plugins.luasnip.snippets'
|
||||
for name, snippet in pairs(snippets.list) do
|
||||
ls.add_snippets(name, snippet)
|
||||
end
|
||||
|
||||
-- Keymaps.
|
||||
vim.keymap.set({ 'i', 's' }, '<C-k>', function()
|
||||
if ls.expand_or_jumpable() then
|
||||
ls.expand_or_jump()
|
||||
end
|
||||
end, { silent = true })
|
||||
@@ -1,110 +0,0 @@
|
||||
local M = {}
|
||||
|
||||
M.list = {}
|
||||
|
||||
local status_luasnip, ls = pcall(require, 'luasnip')
|
||||
if (status_luasnip) then
|
||||
local s = ls.snippet
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
-- local c = ls.choice_node
|
||||
local fmt = require('luasnip.extras.fmt').fmt
|
||||
|
||||
local javascript = {
|
||||
s('import', {
|
||||
t('import '),
|
||||
i(2, 'lib'),
|
||||
t(' from \''),
|
||||
i(1, 'lib'),
|
||||
t('\'')
|
||||
}),
|
||||
s('try', fmt(
|
||||
[[
|
||||
try {{
|
||||
{}
|
||||
}} catch (e) {{}}
|
||||
]],
|
||||
{
|
||||
i(1)
|
||||
}
|
||||
)),
|
||||
s('/**', fmt(
|
||||
[[
|
||||
/**
|
||||
* {}
|
||||
*/
|
||||
]],
|
||||
{
|
||||
i(1)
|
||||
}
|
||||
)),
|
||||
s('const fn', {
|
||||
t('const '),
|
||||
i(1, 'fn'),
|
||||
t(' = '),
|
||||
i(2, 'async'),
|
||||
t(' ('),
|
||||
i(3),
|
||||
t(') => {'),
|
||||
i(4),
|
||||
t('}')
|
||||
})
|
||||
}
|
||||
|
||||
local vue = {
|
||||
s('<script', {
|
||||
t('<script '),
|
||||
i(1, 'setup'),
|
||||
t(' lang="'),
|
||||
i(2, 'ts'),
|
||||
t('">'),
|
||||
i(3),
|
||||
t('</script>')
|
||||
}),
|
||||
s('<template', {
|
||||
t('<template'),
|
||||
i(1),
|
||||
t('>'),
|
||||
i(2),
|
||||
t('</template>')
|
||||
}),
|
||||
s('<style', {
|
||||
t('<style lang="'),
|
||||
i(1, 'sass'),
|
||||
t('">'),
|
||||
i(2),
|
||||
t('</style>')
|
||||
}),
|
||||
s('const props', {
|
||||
t('const props = defineProps<{'),
|
||||
i(1),
|
||||
t('}>()')
|
||||
}),
|
||||
s('const emit', {
|
||||
t('const emit = defineEmits<{ (e: \''),
|
||||
i(1, 'update:modelValue'),
|
||||
t('\', v: '),
|
||||
i(2, 'any'),
|
||||
t('): void }>()')
|
||||
}),
|
||||
s('onMounted', {
|
||||
t('onMounted(() => '),
|
||||
i(1, 'loadData()'),
|
||||
t(')')
|
||||
})
|
||||
}
|
||||
|
||||
-- Add javascript in vue.
|
||||
for number, value in ipairs(javascript) do
|
||||
vue[6 + number] = value
|
||||
end
|
||||
|
||||
M.list = {
|
||||
javascript = javascript,
|
||||
typescript = javascript,
|
||||
typescriptreact = javascript,
|
||||
vue = vue
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
||||
@@ -1,10 +0,0 @@
|
||||
local status = pcall(require, 'nightfox')
|
||||
|
||||
if status then
|
||||
-- Apply theme.
|
||||
vim.cmd.colorscheme('nightfox')
|
||||
|
||||
-- Transparency.
|
||||
-- vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' })
|
||||
-- vim.api.nvim_set_hl_ns(1)
|
||||
end
|
||||
@@ -1,225 +0,0 @@
|
||||
---
|
||||
Language: Cpp
|
||||
# BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignArrayOfStructures: None
|
||||
AlignConsecutiveAssignments:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
PadOperators: true
|
||||
AlignConsecutiveBitFields:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveDeclarations:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveMacros:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
PadOperators: false
|
||||
AlignEscapedNewlines: Right
|
||||
AlignOperands: Align
|
||||
AlignTrailingComments:
|
||||
Kind: Always
|
||||
OverEmptyLines: 0
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: MultiLine
|
||||
AttributeMacros:
|
||||
- __capability
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BitFieldColonSpacing: Both
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: false
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: false
|
||||
AfterExternBlock: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakAfterAttributes: Never
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakArrays: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeConceptDeclarations: Always
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeInlineASMColon: OnlyMultiline
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakInheritanceList: BeforeColon
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 80
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
EmptyLineAfterAccessModifier: Never
|
||||
EmptyLineBeforeAccessModifier: LogicalBlock
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
IfMacros:
|
||||
- KJ_IF_MAYBE
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
||||
Priority: 2
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
||||
Priority: 3
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: '.*'
|
||||
Priority: 1
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
IncludeIsMainRegex: '(Test)?$'
|
||||
IncludeIsMainSourceRegex: ''
|
||||
IndentAccessModifiers: false
|
||||
IndentCaseBlocks: false
|
||||
IndentCaseLabels: false
|
||||
IndentExternBlock: AfterExternBlock
|
||||
IndentGotoLabels: true
|
||||
IndentPPDirectives: None
|
||||
IndentRequiresClause: true
|
||||
IndentWidth: 2
|
||||
IndentWrappedFunctionNames: false
|
||||
InsertBraces: false
|
||||
InsertNewlineAtEOF: false
|
||||
InsertTrailingCommas: None
|
||||
IntegerLiteralSeparator:
|
||||
Binary: 0
|
||||
BinaryMinDigits: 0
|
||||
Decimal: 0
|
||||
DecimalMinDigits: 0
|
||||
Hex: 0
|
||||
HexMinDigits: 0
|
||||
JavaScriptQuotes: Leave
|
||||
JavaScriptWrapImports: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
LambdaBodyIndentation: Signature
|
||||
LineEnding: DeriveLF
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBinPackProtocolList: Auto
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCBreakBeforeNestedBlockParam: true
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PackConstructorInitializers: BinPack
|
||||
PenaltyBreakAssignment: 2
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakOpenParenthesis: 0
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakTemplateDeclaration: 10
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyIndentedWhitespace: 0
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerAlignment: Right
|
||||
PPIndentWidth: -1
|
||||
QualifierAlignment: Leave
|
||||
ReferenceAlignment: Pointer
|
||||
ReflowComments: true
|
||||
RemoveBracesLLVM: false
|
||||
RemoveSemicolon: false
|
||||
RequiresClausePosition: OwnLine
|
||||
RequiresExpressionIndentation: OuterScope
|
||||
SeparateDefinitionBlocks: Leave
|
||||
ShortNamespaceLines: 1
|
||||
SortIncludes: CaseSensitive
|
||||
SortJavaStaticImport: Before
|
||||
SortUsingDeclarations: LexicographicNumeric
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceAroundPointerQualifiers: Default
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeParensOptions:
|
||||
AfterControlStatements: true
|
||||
AfterForeachMacros: true
|
||||
AfterFunctionDefinitionName: false
|
||||
AfterFunctionDeclarationName: false
|
||||
AfterIfMacros: true
|
||||
AfterOverloadedOperator: false
|
||||
AfterRequiresInClause: false
|
||||
AfterRequiresInExpression: false
|
||||
BeforeNonEmptyParentheses: false
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: false
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: Never
|
||||
SpacesInConditionalStatement: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInLineCommentPrefix:
|
||||
Minimum: 1
|
||||
Maximum: -1
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Latest
|
||||
StatementAttributeLikeMacros:
|
||||
- Q_EMIT
|
||||
StatementMacros:
|
||||
- Q_UNUSED
|
||||
- QT_REQUIRE_VERSION
|
||||
TabWidth: 2
|
||||
UseTab: Always
|
||||
WhitespaceSensitiveMacros:
|
||||
- BOOST_PP_STRINGIZE
|
||||
- CF_SWIFT_NAME
|
||||
- NS_SWIFT_NAME
|
||||
- PP_STRINGIZE
|
||||
- STRINGIZE
|
||||
...
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"useTabs": true,
|
||||
"tabWidth": 2,
|
||||
"singleQuote": true,
|
||||
"semi": false,
|
||||
"trailingComma": "none",
|
||||
"arrowParens": "avoid",
|
||||
"printWidth": 79
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
-- Null-ls.
|
||||
local status, null_ls = pcall(require, 'null-ls')
|
||||
if (not status) then return end
|
||||
|
||||
local formatting = null_ls.builtins.formatting
|
||||
local prettier_config = vim.fn.stdpath('config') .. '/lua/axp/plugins/null-ls/.prettierrc'
|
||||
-- local clang_format_config = vim.fn.stdpath('config') .. '/lua/axp/plugins/null-ls/.clang-format'
|
||||
|
||||
-- Init.
|
||||
null_ls.setup {
|
||||
sources = {
|
||||
-- formatting.clang_format.with({
|
||||
-- extra_args = {
|
||||
-- -- '--style=Google'
|
||||
-- '--assume-filename=' .. clang_format_config
|
||||
-- }
|
||||
-- }),
|
||||
formatting.prettier.with({
|
||||
extra_args = { '--config', prettier_config }
|
||||
})
|
||||
},
|
||||
on_attach = function (client, bufnr)
|
||||
if client.supports_method('textDocument/formatting') then
|
||||
-- Create a command `:Format` local to the LSP buffer
|
||||
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||
vim.lsp.buf.format()
|
||||
end, { desc = 'Format current buffer with LSP' })
|
||||
end
|
||||
end
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
local status, cmp = pcall(require, 'cmp')
|
||||
if (not status) then return end
|
||||
|
||||
local status_ls, ls = pcall(require, 'luasnip')
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
if (status_ls) then
|
||||
ls.lsp_expand(args.body)
|
||||
end
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
['<C-d>'] = cmp.mapping.scroll_docs( -4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete {},
|
||||
['<CR>'] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
},
|
||||
},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
local status, telescope = pcall(require, 'telescope')
|
||||
if (not status) then return end
|
||||
|
||||
-- Configure.
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
file_ignore_patterns = {
|
||||
'.git',
|
||||
'node_modules',
|
||||
'dist',
|
||||
'static',
|
||||
'public'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- See `:help telescope.builtin`
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
-- Search.
|
||||
vim.keymap.set('n', '<leader>sf', builtin.find_files)
|
||||
vim.keymap.set('n', '<leader>sw', builtin.grep_string)
|
||||
vim.keymap.set('n', '<leader>sg', builtin.live_grep)
|
||||
|
||||
-- Old files.
|
||||
vim.keymap.set('n', '<leader>?', builtin.oldfiles)
|
||||
|
||||
-- Search current buffer.
|
||||
-- vim.keymap.set('n', '<leader>/', function()
|
||||
-- builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||
-- winblend = 10,
|
||||
-- previewer = false,
|
||||
-- })
|
||||
-- end)
|
||||
@@ -1,40 +0,0 @@
|
||||
local status, ts = pcall(require, 'nvim-treesitter.configs')
|
||||
if (not status) then return end
|
||||
|
||||
ts.setup {
|
||||
ensure_installed = {
|
||||
'vim',
|
||||
'lua',
|
||||
'cmake',
|
||||
'cpp',
|
||||
'bash',
|
||||
'javascript',
|
||||
'typescript',
|
||||
'tsx',
|
||||
'json',
|
||||
'html',
|
||||
'pug',
|
||||
'vue',
|
||||
'css',
|
||||
'scss',
|
||||
'python',
|
||||
'dockerfile',
|
||||
'regex',
|
||||
'markdown',
|
||||
'yaml',
|
||||
'astro',
|
||||
},
|
||||
ignore_install = {},
|
||||
modules = {},
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
autotag = { enable = true },
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = {},
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
disable = {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user