changes
This commit is contained in:
parent
f976a7cba6
commit
1fd3c1d354
29
init.lua
29
init.lua
|
|
@ -158,8 +158,9 @@ vim.opt.cursorline = true
|
||||||
-- Minimal number of screen lines to keep above and below the cursor.
|
-- Minimal number of screen lines to keep above and below the cursor.
|
||||||
vim.opt.scrolloff = 10
|
vim.opt.scrolloff = 10
|
||||||
|
|
||||||
vim.opt.shiftwidth = 4
|
vim.cmd 'set expandtab'
|
||||||
vim.opt.tabstop = 4
|
|
||||||
|
vim.opt.smartindent = false
|
||||||
|
|
||||||
-- [[ Basic Keymaps ]]
|
-- [[ Basic Keymaps ]]
|
||||||
-- See `:help vim.keymap.set()`
|
-- See `:help vim.keymap.set()`
|
||||||
|
|
@ -233,7 +234,7 @@ vim.opt.rtp:prepend(lazypath)
|
||||||
-- NOTE: Here is where you install your plugins.
|
-- NOTE: Here is where you install your plugins.
|
||||||
require('lazy').setup({
|
require('lazy').setup({
|
||||||
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
||||||
-- 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||||
|
|
||||||
-- NOTE: Plugins can also be added by using a table,
|
-- NOTE: Plugins can also be added by using a table,
|
||||||
-- with the first argument being the link and the following
|
-- with the first argument being the link and the following
|
||||||
|
|
@ -607,6 +608,13 @@ require('lazy').setup({
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
||||||
|
|
||||||
|
local read_exec_path = function(exec_name)
|
||||||
|
local handle = io.popen('which ' .. exec_name)
|
||||||
|
local result = handle:read('*a'):gsub('\n', '')
|
||||||
|
handle:close()
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
-- Enable the following language servers
|
-- Enable the following language servers
|
||||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||||
--
|
--
|
||||||
|
|
@ -617,9 +625,17 @@ require('lazy').setup({
|
||||||
-- - settings (table): Override the default settings passed when initializing the server.
|
-- - settings (table): Override the default settings passed when initializing the server.
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
clangd = {},
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
pyright = {},
|
pyright = {
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
python = {
|
||||||
|
-- Use the locally available python executable. Enables using pyright from an activated venv.
|
||||||
|
pythonPath = read_exec_path 'python',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
--
|
--
|
||||||
|
|
@ -701,7 +717,7 @@ require('lazy').setup({
|
||||||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||||
-- have a well standardized coding style. You can add additional
|
-- have a well standardized coding style. You can add additional
|
||||||
-- languages here or re-enable it for the disabled ones.
|
-- languages here or re-enable it for the disabled ones.
|
||||||
local disable_filetypes = { c = true, cpp = true }
|
local disable_filetypes = { c = true, cpp = true, tex = true }
|
||||||
local lsp_format_opt
|
local lsp_format_opt
|
||||||
if disable_filetypes[vim.bo[bufnr].filetype] then
|
if disable_filetypes[vim.bo[bufnr].filetype] then
|
||||||
lsp_format_opt = 'never'
|
lsp_format_opt = 'never'
|
||||||
|
|
@ -715,6 +731,7 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
|
markdown = { 'markdownlint' },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
-- python = { "isort", "black" },
|
-- python = { "isort", "black" },
|
||||||
--
|
--
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ return {
|
||||||
-- VimTeX configuration goes here, e.g.
|
-- VimTeX configuration goes here, e.g.
|
||||||
vim.g.vimtex_view_method = 'zathura'
|
vim.g.vimtex_view_method = 'zathura'
|
||||||
end,
|
end,
|
||||||
-- config = function()
|
config = function()
|
||||||
-- vim.g.vimtex_indent_enabled = 0
|
vim.g.vimtex_compiler_latexmk = { ['out_dir'] = '/home/franchioping/Notes/build' }
|
||||||
-- end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'franchioping/luasnip-latex-snippets.nvim',
|
'franchioping/luasnip-latex-snippets.nvim',
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'kawre/leetcode.nvim',
|
||||||
|
build = ':TSUpdate html', -- if you have `nvim-treesitter` installed
|
||||||
|
dependencies = {
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
-- "ibhagwan/fzf-lua",
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
'MunifTanjim/nui.nvim',
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
-- configuration goes here
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -5,9 +5,9 @@ return {
|
||||||
event = { 'BufReadPre', 'BufNewFile' },
|
event = { 'BufReadPre', 'BufNewFile' },
|
||||||
config = function()
|
config = function()
|
||||||
local lint = require 'lint'
|
local lint = require 'lint'
|
||||||
-- lint.linters_by_ft = {
|
lint.linters_by_ft = {
|
||||||
-- markdown = { 'markdownlint' },
|
markdown = { 'markdownlint' },
|
||||||
-- }
|
}
|
||||||
|
|
||||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||||
-- instead set linters_by_ft like this:
|
-- instead set linters_by_ft like this:
|
||||||
|
|
@ -39,7 +39,7 @@ return {
|
||||||
-- lint.linters_by_ft['rst'] = nil
|
-- lint.linters_by_ft['rst'] = nil
|
||||||
-- lint.linters_by_ft['ruby'] = nil
|
-- lint.linters_by_ft['ruby'] = nil
|
||||||
-- lint.linters_by_ft['terraform'] = nil
|
-- lint.linters_by_ft['terraform'] = nil
|
||||||
-- lint.linters_by_ft['text'] = nil
|
lint.linters_by_ft['text'] = nil
|
||||||
|
|
||||||
-- Create autocommand which carries out the actual linting
|
-- Create autocommand which carries out the actual linting
|
||||||
-- on the specified events.
|
-- on the specified events.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue