nvim-config
This commit is contained in:
parent
3338d39206
commit
ad5d34530f
14 changed files with 563 additions and 33 deletions
127
init.lua
127
init.lua
|
|
@ -698,6 +698,59 @@ require('lazy').setup({
|
|||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- TypeScript
|
||||
ts_ls = {
|
||||
settings = {
|
||||
typescript = {
|
||||
inlayHints = {
|
||||
includeInlayParameterNameHints = 'all',
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||
includeInlayFunctionParameterTypeHints = true,
|
||||
includeInlayVariableTypeHints = true,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
},
|
||||
},
|
||||
javascript = {
|
||||
inlayHints = {
|
||||
includeInlayParameterNameHints = 'all',
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||
includeInlayFunctionParameterTypeHints = true,
|
||||
includeInlayVariableTypeHints = true,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Python
|
||||
pyright = {
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
autoSearchPaths = true,
|
||||
diagnosticMode = 'workspace',
|
||||
useLibraryCodeForTypes = true,
|
||||
typeCheckingMode = 'basic',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Terraform
|
||||
terraformls = {
|
||||
settings = {
|
||||
terraform = {
|
||||
experimentalFeatures = {
|
||||
validateOnSave = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Ensure the servers and tools above are installed
|
||||
|
|
@ -716,6 +769,9 @@ require('lazy').setup({
|
|||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua', -- Used to format Lua code
|
||||
'prettier', -- Formatter for TypeScript/JavaScript
|
||||
'black', -- Formatter for Python
|
||||
'isort', -- Python import sorting
|
||||
})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
|
|
@ -876,27 +932,28 @@ require('lazy').setup({
|
|||
},
|
||||
},
|
||||
|
||||
{ -- You can easily change to a different colorscheme.
|
||||
-- Change the name of the colorscheme plugin below, and then
|
||||
-- change the command in the config to whatever the name of that colorscheme is.
|
||||
--
|
||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
'folke/tokyonight.nvim',
|
||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
config = function()
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require('tokyonight').setup {
|
||||
styles = {
|
||||
comments = { italic = false }, -- Disable italics in comments
|
||||
},
|
||||
}
|
||||
|
||||
-- Load the colorscheme here.
|
||||
-- Like many other themes, this one has different styles, and you could load
|
||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
vim.cmd.colorscheme 'tokyonight-night'
|
||||
end,
|
||||
},
|
||||
-- { -- You can easily change to a different colorscheme.
|
||||
-- -- Change the name of the colorscheme plugin below, and then
|
||||
-- -- change the command in the config to whatever the name of that colorscheme is.
|
||||
-- --
|
||||
-- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
-- 'folke/tokyonight.nvim',
|
||||
-- priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
-- config = function()
|
||||
-- ---@diagnostic disable-next-line: missing-fields
|
||||
-- require('tokyonight').setup {
|
||||
-- styles = {
|
||||
-- comments = { italic = false }, -- Disable italics in comments
|
||||
-- },
|
||||
-- }
|
||||
--
|
||||
-- -- Load the colorscheme here.
|
||||
-- -- Like many other themes, this one has different styles, and you could load
|
||||
-- -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
-- vim.cmd.colorscheme 'tokyonight-night'
|
||||
-- end,
|
||||
-- },
|
||||
-- NOTE: TokyoNight is disabled in favor of Gruvbox (configured in lua/custom/plugins/gruvbox.lua)
|
||||
|
||||
-- Highlight todo, notes, etc in comments
|
||||
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
||||
|
|
@ -922,17 +979,18 @@ require('lazy').setup({
|
|||
-- Simple and easy statusline.
|
||||
-- You could remove this setup call if you don't like it,
|
||||
-- and try some other statusline plugin
|
||||
local statusline = require 'mini.statusline'
|
||||
-- set use_icons to true if you have a Nerd Font
|
||||
statusline.setup { use_icons = vim.g.have_nerd_font }
|
||||
|
||||
-- You can configure sections in the statusline by overriding their
|
||||
-- default behavior. For example, here we set the section for
|
||||
-- cursor location to LINE:COLUMN
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
statusline.section_location = function()
|
||||
return '%2l:%-2v'
|
||||
end
|
||||
-- NOTE: mini.statusline is disabled in favor of lualine (configured in lua/custom/plugins/lualine.lua)
|
||||
-- local statusline = require 'mini.statusline'
|
||||
-- -- set use_icons to true if you have a Nerd Font
|
||||
-- statusline.setup { use_icons = vim.g.have_nerd_font }
|
||||
--
|
||||
-- -- You can configure sections in the statusline by overriding their
|
||||
-- -- default behavior. For example, here we set the section for
|
||||
-- -- cursor location to LINE:COLUMN
|
||||
-- ---@diagnostic disable-next-line: duplicate-set-field
|
||||
-- statusline.section_location = function()
|
||||
-- return '%2l:%-2v'
|
||||
-- end
|
||||
|
||||
-- ... and there is more!
|
||||
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||
|
|
@ -984,7 +1042,7 @@ require('lazy').setup({
|
|||
-- This is the easiest way to modularize your config.
|
||||
--
|
||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||
-- { import = 'custom.plugins' },
|
||||
{ import = 'custom.plugins' },
|
||||
--
|
||||
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
||||
-- Or use telescope!
|
||||
|
|
@ -1012,5 +1070,8 @@ require('lazy').setup({
|
|||
},
|
||||
})
|
||||
|
||||
-- Load custom keymaps
|
||||
require('custom.keymaps')
|
||||
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue