uncommented some stuff
This commit is contained in:
parent
ab1c35c00d
commit
5619763708
36
init.lua
36
init.lua
|
|
@ -99,7 +99,7 @@ do
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||||
vim.g.have_nerd_font = true
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.o`
|
-- See `:help vim.o`
|
||||||
|
|
@ -685,10 +685,10 @@ do
|
||||||
-- See `:help lsp-config` for information about keys and how to configure
|
-- See `:help lsp-config` for information about keys and how to configure
|
||||||
---@type table<string, vim.lsp.Config>
|
---@type table<string, vim.lsp.Config>
|
||||||
local servers = {
|
local servers = {
|
||||||
clangd = {},
|
clangd = {},
|
||||||
gopls = {},
|
gopls = {},
|
||||||
pyright = {},
|
pyright = {},
|
||||||
rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
--
|
--
|
||||||
-- Some languages (like typescript) have entire language plugins that can be useful:
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||||
-- https://github.com/pmizio/typescript-tools.nvim
|
-- https://github.com/pmizio/typescript-tools.nvim
|
||||||
|
|
@ -707,7 +707,7 @@ do
|
||||||
local path = client.workspace_folders[1].name
|
local path = client.workspace_folders[1].name
|
||||||
if path ~= vim.fn.stdpath 'config' and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc')) then return end
|
if path ~= vim.fn.stdpath 'config' and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc')) then return end
|
||||||
end
|
end
|
||||||
|
---@diag-disable-next-line: assign-type-mismatch
|
||||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||||
runtime = {
|
runtime = {
|
||||||
version = 'LuaJIT',
|
version = 'LuaJIT',
|
||||||
|
|
@ -777,7 +777,7 @@ do
|
||||||
local enabled_filetypes = {
|
local enabled_filetypes = {
|
||||||
-- lua = true,
|
-- lua = true,
|
||||||
-- python = true,
|
-- python = true,
|
||||||
cpp = true;
|
cpp = true,
|
||||||
}
|
}
|
||||||
if enabled_filetypes[vim.bo[bufnr].filetype] then
|
if enabled_filetypes[vim.bo[bufnr].filetype] then
|
||||||
return { timeout_ms = 500 }
|
return { timeout_ms = 500 }
|
||||||
|
|
@ -796,8 +796,8 @@ do
|
||||||
--
|
--
|
||||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||||
cpp = {"clang-format"},
|
cpp = { 'clang-format' },
|
||||||
c = {"clang-format"},
|
c = { 'clang-format' },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -902,7 +902,7 @@ do
|
||||||
-- Ensure basic parsers are installed
|
-- Ensure basic parsers are installed
|
||||||
local parsers = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'cpp', 'python' }
|
local parsers = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'cpp', 'python' }
|
||||||
require('nvim-treesitter').install(parsers)
|
require('nvim-treesitter').install(parsers)
|
||||||
|
|
||||||
---@param buf integer
|
---@param buf integer
|
||||||
---@param language string
|
---@param language string
|
||||||
local function treesitter_try_attach(buf, language)
|
local function treesitter_try_attach(buf, language)
|
||||||
|
|
@ -913,8 +913,8 @@ do
|
||||||
|
|
||||||
-- Enable treesitter based folds
|
-- Enable treesitter based folds
|
||||||
-- For more info on folds see `:help folds`
|
-- For more info on folds see `:help folds`
|
||||||
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||||
vim.wo.foldmethod = 'indent'
|
vim.wo.foldmethod = 'indent'
|
||||||
|
|
||||||
-- Check if treesitter indentation is available for this language, and if so enable it
|
-- Check if treesitter indentation is available for this language, and if so enable it
|
||||||
-- in case there is no indent query, the indentexpr will fallback to the vim's built in one
|
-- in case there is no indent query, the indentexpr will fallback to the vim's built in one
|
||||||
|
|
@ -962,12 +962,12 @@ do
|
||||||
-- Here are some example plugins that I've included in the Kickstart repository.
|
-- Here are some example plugins that I've included in the Kickstart repository.
|
||||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||||
--
|
--
|
||||||
require 'kickstart.plugins.debug'
|
require 'kickstart.plugins.debug'
|
||||||
require 'kickstart.plugins.indent_line'
|
require 'kickstart.plugins.indent_line'
|
||||||
require 'kickstart.plugins.lint'
|
require 'kickstart.plugins.lint'
|
||||||
require 'kickstart.plugins.autopairs'
|
require 'kickstart.plugins.autopairs'
|
||||||
require 'kickstart.plugins.neo-tree'
|
require 'kickstart.plugins.neo-tree'
|
||||||
require 'kickstart.plugins.gitsigns' -- adds gitsigns recommended keymaps
|
require 'kickstart.plugins.gitsigns' -- adds gitsigns recommended keymaps
|
||||||
|
|
||||||
-- NOTE: You can add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: You can add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
--
|
--
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue